Add compile command to each testcase
[gcc-vect-testsuite.git] / vect-iv-1.c
blob5d6ab5cd242da34d5082e23a029500bb0c4597a1
1 /* { dg-require-effective-target vect_int } */
3 #include <stdarg.h>
4 #include "tree-vect.h"
6 #define N 16
7 int result[N] = {8, 10, 12, 14, 16, 18, 20, 22, 24, 26, 28, 30, 32, 34, 36, 38};
9 __attribute__ ((noinline)) int main1 (int X)
11 int arr[N];
12 int k = X;
13 int m, i=0;
15 /* vectorization of induction. */
17 do {
18 m = k + 5;
19 arr[i] = m;
20 k = k + 2;
21 i++;
22 } while (i < N);
24 /* check results: */
25 for (i = 0; i < N; i++)
27 if (arr[i] != result[i])
28 abort ();
31 return 0;
34 int main (void)
36 check_vect ();
38 return main1 (3);
41 /* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" } } */
42 /* { dg-final { cleanup-tree-dump "vect" } } */