Tighten condition in vect/pr85586.c (PR 85654)
[official-gcc.git] / gcc / testsuite / gcc.dg / vect / vect-85.c
bloba73bae1ad41a23ab583d7fd1f5cf8234d516d515
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" } } */