Sync usage with man page.
[netbsd-mini2440.git] / gnu / dist / gcc4 / gcc / testsuite / gcc.dg / vect / vect-65.c
blob4215441cee85428ab66f762828a54002d4e851c2
1 /* { dg-require-effective-target vect_int } */
3 #include <stdarg.h>
4 #include "tree-vect.h"
6 #define N 16
7 #define M 4
9 int main1 ()
11 int i, j;
12 int ib[M][M][N] = {{{0,3,6,9,12,15,18,21,24,27,30,33,36,39,42,45},
13 {0,3,6,9,12,15,18,21,24,27,30,33,36,39,42,45},
14 {0,3,6,9,12,15,18,21,24,27,30,33,36,39,42,45},
15 {0,3,6,9,12,15,18,21,24,27,30,33,36,39,42,45}},
16 {{0,3,6,9,12,15,18,21,24,27,30,33,36,39,42,45},
17 {0,3,6,9,12,15,18,21,24,27,30,33,36,39,42,45},
18 {0,3,6,9,12,15,18,21,24,27,30,33,36,39,42,45},
19 {0,3,6,9,12,15,18,21,24,27,30,33,36,39,42,45}},
20 {{0,3,6,9,12,15,18,21,24,27,30,33,36,39,42,45},
21 {0,3,6,9,12,15,18,21,24,27,30,33,36,39,42,45},
22 {0,3,6,9,12,15,18,21,24,27,30,33,36,39,42,45},
23 {0,3,6,9,12,15,18,21,24,27,30,33,36,39,42,45}},
24 {{0,3,6,9,12,15,18,21,24,27,30,33,36,39,42,45},
25 {0,3,6,9,12,15,18,21,24,27,30,33,36,39,42,45},
26 {0,3,6,9,12,15,18,21,24,27,30,33,36,39,42,45},
27 {0,3,6,9,12,15,18,21,24,27,30,33,36,39,42,45}}};
28 int ia[M][M][N];
29 int ic[N];
31 /* Multidimensional array. Aligned. The "inner" dimensions
32 are invariant in the inner loop. Load and store. */
33 for (i = 0; i < M; i++)
35 for (j = 0; j < N; j++)
37 ia[i][1][j] = ib[2][i][j];
41 /* check results: */
42 for (i = 0; i < M; i++)
44 for (j = 0; j < N; j++)
46 if (ia[i][1][j] != ib[2][i][j])
47 abort();
51 /* Multidimensional array. Aligned. The "inner" dimensions
52 are invariant in the inner loop. Load. */
53 for (i = 0; i < M; i++)
55 for (j = 0; j < N; j++)
57 ic[j] = ib[2][i][j];
61 /* check results: */
62 for (i = 0; i < M; i++)
64 for (j = 0; j < N; j++)
66 if (ic[j] != ib[2][i][j])
67 abort();
71 return 0;
74 int main (void)
76 check_vect ();
78 return main1 ();
81 /* { dg-final { scan-tree-dump-times "vectorized 2 loops" 1 "vect" } } */
82 /* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 0 "vect" } } */
83 /* { dg-final { cleanup-tree-dump "vect" } } */