PR middle-end/77357 - strlen of constant strings not folded
[official-gcc.git] / gcc / testsuite / gcc.dg / vect / vect-67.c
blob12183a233c273d8ae3932fa312e1734b48f8c7b0
1 /* { dg-require-effective-target vect_int } */
3 #include <stdarg.h>
4 #include "tree-vect.h"
6 #if VECTOR_BITS > 256
7 #define NINTS (VECTOR_BITS / 32)
8 #else
9 #define NINTS 8
10 #endif
12 #define N (NINTS * 2)
14 __attribute__ ((noinline))
15 int main1 (int a, int b)
17 int i, j;
18 int ia[N][4][N + NINTS];
20 /* Multidimensional array. Aligned. The "inner" dimensions
21 are invariant in the inner loop. Store.
22 Not vectorizable: unsupported operation. */
23 for (i = 0; i < N; i++)
25 for (j = 0; j < N; j++)
27 ia[i][1][j + NINTS] = (a == b);
31 /* check results: */
32 for (i = 0; i < N; i++)
34 for (j = 0; j < N; j++)
36 if (ia[i][1][j + NINTS] != (a == b))
37 abort();
41 return 0;
44 int main (void)
46 check_vect ();
48 return main1 (2 ,7);
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" { xfail { ! vect_align_stack_vars } } } } */