2018-05-17 Richard Biener <rguenther@suse.de>
[official-gcc.git] / gcc / testsuite / gcc.dg / vect / no-scevccp-vect-iv-1.c
blobb78af245a3933ddf9d34e0c70ecd865d83a38183
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" } } */