Remove old autovect-branch by moving to "dead" directory.
[official-gcc.git] / old-autovect-branch / gcc / testsuite / gcc.dg / vect / vect-85.c
blob4c242626427a31d441b2bf70d313c6cf0f713b43
1 /* { dg-require-effective-target vect_int } */
3 #include <stdarg.h>
4 #include "tree-vect.h"
6 #define N 16
8 int main1 (int *a)
10 int i, j, k;
11 int b[N];
13 for (i = 0; i < N; i++)
15 for (j = 0; j < N; j++)
17 k = i + N;
18 a[j] = k;
20 b[i] = k;
24 for (j = 0; j < N; j++)
25 if (a[j] != i + N - 1)
26 abort();
28 for (j = 0; j < N; j++)
29 if (b[j] != j + N)
30 abort();
32 return 0;
35 int main (void)
37 int a[N] __attribute__ ((__aligned__(16)));
39 check_vect ();
41 main1 (a);
43 return 0;
46 /* Fails for targets that don't vectorize PLUS (e.g alpha). */
47 /* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" } } */
48 /* { dg-final { cleanup-tree-dump "vect" } } */