Merge from mainline (167278:168000).
[official-gcc/graphite-test-results.git] / gcc / testsuite / gcc.dg / vect / no-scevccp-vect-iv-3.c
blob9bf3b4b762ccb203b9f0e54406dc3bc17e6c09ac
1 /* { dg-do compile } */
2 /* { dg-require-effective-target vect_int } */
4 #include <stdarg.h>
5 #include "tree-vect.h"
7 #define N 26
9 __attribute__ ((noinline))
10 unsigned int main1 ()
12 unsigned short i;
13 unsigned int intsum = 0;
15 /* vectorization of reduction with induction, and widenning sum:
16 sum shorts into int.
17 Need -fno-tree-scev-cprop or else the loop is eliminated. */
18 for (i = 0; i < N; i++)
20 intsum += i;
23 return intsum;
26 /* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" { target vect_widen_sum_hi_to_si } } } */
27 /* { dg-final { scan-tree-dump-times "vect_recog_widen_sum_pattern: detected" 1 "vect" { target vect_widen_sum_hi_to_si } } } */
28 /* { dg-final { cleanup-tree-dump "vect" } } */