1 /* { dg-require-effective-target vect_int } */
2 
3 #include <stdarg.h>
4 #include "tree-vect.h"
5 
6 #define N 26
7 
main1(int X)8 __attribute__ ((noinline)) int main1 (int X)
9 {
10   int s = X;
11   int i;
12 
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;
17 
18   return s;
19 }
20 
main(void)21 int main (void)
22 {
23   int s;
24   check_vect ();
25 
26   s = main1 (3);
27   if (s != 328)
28     abort ();
29 
30   return 0;
31 }
32 
33 /* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" } } */
34