Add compile command to each testcase
[gcc-vect-testsuite.git] / vect-85.c
bloba5bf5db078a3998bd2a8fa4dd69724fa2aa36f42
1 /* { dg-require-effective-target vect_int } */
3 #include <stdarg.h>
4 #include "tree-vect.h"
6 #define N 16
8 __attribute__ ((noinline))
9 int main1 (int *a)
11 int i, j, k;
12 int b[N];
14 for (i = 0; i < N; i++)
16 for (j = 0; j < N; j++)
18 k = i + N;
19 a[j] = k;
21 b[i] = k;
25 for (j = 0; j < N; j++)
26 if (a[j] != i + N - 1)
27 abort();
29 for (j = 0; j < N; j++)
30 if (b[j] != j + N)
31 abort();
33 return 0;
36 int main (void)
38 int a[N] __attribute__ ((__aligned__(__BIGGEST_ALIGNMENT__)));
40 check_vect ();
42 main1 (a);
44 return 0;
47 /* Fails for targets that don't vectorize PLUS (e.g alpha). */
48 /* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" } } */
49 /* { dg-final { cleanup-tree-dump "vect" } } */