testsuite: Revert to the original version of pr100056.c
[official-gcc.git] / gcc / testsuite / gcc.dg / vect / pr59591-1.c
blobe768fb3e1de48cf43b389cf83b4f7f1f030c4f91
1 /* PR tree-optimization/59591 */
2 /* { dg-additional-options "-fopenmp-simd" } */
4 #ifndef CHECK_H
5 #include "tree-vect.h"
6 #endif
8 extern void abort (void);
10 int p[256], q[256], r[256], t[256];
12 __attribute__((noinline, noclone)) void
13 foo (void)
15 int i;
16 #pragma omp simd safelen(64)
17 for (i = 0; i < 256; i++)
18 if (r[i] > 32)
19 t[i] = p[q[i] * 3L + 2L];
22 __attribute__((noinline, noclone)) void
23 bar (void)
25 int i;
26 for (i = 0; i < 256; i++)
28 r[i] = ((i >> 2) & (1 << (i & 3))) ? 32 + i : 32 - i;
29 q[i] = r[i] > 32 ? ((i * 7) % 84) : 99 + i;
30 p[i] = i * 11;
31 t[i] = i * 13;
33 foo ();
34 #pragma GCC novector
35 for (i = 0; i < 256; i++)
36 if ((i >> 2) & (1 << (i & 3)))
38 if (t[i] != (((i * 7) % 84) * 3 + 2) * 11)
39 abort ();
41 else if (t[i] != i * 13)
42 abort ();
45 #ifndef CHECK_H
46 int
47 main ()
49 check_vect ();
50 bar ();
51 return 0;
53 #endif