Remove old autovect-branch by moving to "dead" directory.
[official-gcc.git] / old-autovect-branch / gcc / testsuite / gcc.dg / vect / vect-88.c
blob478a142bfb067cad73b2dff3017ff8fc88af6f43
1 /* { dg-require-effective-target vect_int } */
3 #include <stdarg.h>
4 #include "tree-vect.h"
6 #define N 16
8 int main1 (int n, 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+1] __attribute__ ((__aligned__(16)));
39 check_vect ();
41 main1 (N, a+1);
42 main1 (0, a+1);
43 main1 (1, a+1);
44 main1 (2, a+1);
45 main1 (N-1, a+1);
47 return 0;
50 /* Fails for targets that don't vectorize PLUS (e.g alpha). */
51 /* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" } } */
52 /* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 0 "vect" } } */
53 /* { dg-final { scan-tree-dump-times "Alignment of access forced using peeling" 1 "vect" } } */
54 /* { dg-final { cleanup-tree-dump "vect" } } */