Add compile command to each testcase
[gcc-vect-testsuite.git] / vect-vfa-01.c
blob4ae967a19c65e91dbc6172f5b8b4090e64917eda
1 /* { dg-require-effective-target vect_int } */
3 #include <stdarg.h>
4 #include "tree-vect.h"
6 #define N 16
7 int result[N] = {12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27};
8 int X[N] = {10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25};
9 int Y[N] = {};
11 __attribute__ ((noinline)) void
12 foo (int *in, int *out)
14 int i;
16 for (i = 0; i < N; i++)
17 out[i] = in[i] + 2;
20 int
21 main (void)
23 int i;
25 check_vect ();
27 foo (X, Y);
29 /* check results: */
30 for (i = 0; i < N; i++)
32 if (Y[i] != result[i])
33 abort ();
35 return 0;
38 /* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" } } */
39 /* { dg-final { cleanup-tree-dump "vect" } } */