Merge -r 127928:132243 from trunk
[official-gcc.git] / gcc / testsuite / gcc.dg / vect / no-scevccp-vect-iv-1.c
blob9793a129e72db783b825aa0fa327abe39584123e
1 /* { dg-require-effective-target vect_int } */
3 #include <stdarg.h>
4 #include "tree-vect.h"
6 #define N 26
8 __attribute__ ((noinline)) int main1 (int X)
9 {
10 int s = X;
11 int i;
13 /* vectorization of reduction with induction.
14 Need -fno-tree-scev-cprop or else the loop is eliminated. */
15 for (i = 0; i < N; i++)
16 s += i;
18 return s;
21 int main (void)
23 int s;
24 check_vect ();
26 s = main1 (3);
27 if (s != 328)
28 abort ();
30 return 0;
33 /* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" } } */
34 /* { dg-final { cleanup-tree-dump "vect" } } */