cfgexpand: Expand comment on when non-var clobbers can show up
[official-gcc.git] / gcc / testsuite / gcc.dg / vect / vect-76-big-array.c
blob7db7727a9ee44a647cfbeafc3c230c3b3ec70c08
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 124
8 #define OFF 4
10 /* Check handling of accesses for which the "initial condition" -
11 the expression that represents the first location accessed - is
12 more involved than just an ssa_name. */
14 int ib[N+OFF] __attribute__ ((__aligned__(__BIGGEST_ALIGNMENT__))) = {0, 1, 3, 5, 7, 11, 13, 17};
15 int ic[N+OFF] = {0, 1, 3, 5, 7, 11, 13, 17};
17 __attribute__ ((noinline))
18 int main1 (int *pib)
20 int i;
21 int ia[N+OFF];
22 for (i = OFF; i < N+OFF; i++)
24 ib[i] = ib[i%8]*(i/8);
25 ic[i] = ic[i%8]*(i/8);
26 asm volatile ("" ::: "memory");
29 for (i = OFF; i < N; i++)
31 ia[i] = pib[i - OFF];
35 /* check results: */
36 #pragma GCC novector
37 for (i = OFF; i < N; i++)
39 if (ia[i] != pib[i - OFF])
40 abort ();
43 for (i = 0; i < N; i++)
45 ia[i] = pib[i - OFF];
49 /* check results: */
50 #pragma GCC novector
51 for (i = 0; i < N; i++)
53 if (ia[i] != pib[i - OFF])
54 abort ();
57 for (i = OFF; i < N; i++)
59 ia[i] = ic[i - OFF];
63 /* check results: */
64 #pragma GCC novector
65 for (i = OFF; i < N; i++)
67 if (ia[i] != ic[i - OFF])
68 abort ();
71 return 0;
74 int main (void)
76 check_vect ();
78 main1 (&ib[OFF]);
79 return 0;
83 /* { dg-final { scan-tree-dump-times "vectorized 3 loops" 1 "vect" } } */
84 /* { dg-final { scan-tree-dump-not "Invalid sum" "optimized" } } */