libcpp, c, middle-end: Optimize initializers using #embed in C
[official-gcc.git] / gcc / testsuite / gcc.dg / vect / vect-63.c
blob2974059556676788c831f8f436bcb9856c584414
1 /* { dg-require-effective-target vect_int } */
2 /* { dg-additional-options "-fdump-tree-optimized-details-blocks" } */
4 #include <stdarg.h>
5 #include "tree-vect.h"
7 #define N 16
9 __attribute__ ((noinline))
10 int main1 ()
12 int i, j;
13 int ib[N] = {0,3,6,9,12,15,18,21,24,27,30,33,36,39,42,45};
14 int ia[N*2][4][N];
16 /* Multidimensional array. Aligned.
17 The first dimension depends on j: use strided stores. */
18 for (i = 0; i < N; i++)
20 for (j = 0; j < N; j++)
22 ia[i + j][1][j] = ib[i];
26 /* check results: */
27 for (i = 0; i < N; i++)
29 #pragma GCC novector
30 for (j = 0; j < N; j++)
32 if (ia[i + j][1][j] != ib[i])
33 abort();
37 return 0;
40 int main (void)
42 check_vect ();
44 return main1 ();
47 /* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" } } */
48 /* { dg-final { scan-tree-dump-not "Invalid sum" "optimized" } } */