Small ChangeLog tweak.
[official-gcc.git] / gcc / testsuite / gcc.dg / vect / vect-62.c
blobf11301c84adf23cdd41b64aadd4c901a4766ea6b
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 ()
11 int i, j;
12 int ib[N] = {0,3,6,9,12,15,18,21,24,27,30,33,36,39,42,45};
13 int ia[N][4][N+8];
15 /* Multidimensional array. Aligned. The "inner" dimensions
16 are invariant in the inner loop. Store. */
17 for (i = 0; i < N; i++)
19 for (j = 0; j < N; j++)
21 ia[i][1][j+8] = ib[i];
25 /* check results: */
26 for (i = 0; i < N; i++)
28 for (j = 0; j < N; j++)
30 if (ia[i][1][j+8] != ib[i])
31 abort();
35 /* Multidimensional array. Aligned. The "inner" dimensions
36 are invariant in the inner loop. The outer loop is
37 vectorizable after invariant/store motion. */
38 for (i = 0; i < N; i++)
40 for (j = 0; j < N; j++)
42 ia[i][1][8] = ib[i];
46 /* check results: */
47 for (i = 0; i < N; i++)
49 for (j = 0; j < N; j++)
51 if (ia[i][1][8] != ib[i])
52 abort();
57 return 0;
60 int main (void)
62 check_vect ();
64 return main1 ();
67 /* { dg-final { scan-tree-dump-times "vectorized 2 loops" 1 "vect" } } */
68 /* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 0 "vect" } } */