arm: fix typo in dg-require-effective-target [PR118089]
[official-gcc.git] / gcc / testsuite / gcc.dg / vect / pr59591-2.c
blob3bdf4252cffe63830b5b47cd17fa29a3c65afc73
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 long long int p[256], r[256], t[256];
11 int q[256];
13 __attribute__((noinline, noclone)) void
14 foo (void)
16 int i;
17 #pragma omp simd safelen(64)
18 for (i = 0; i < 256; i++)
19 if (r[i] > 32LL)
20 t[i] = p[q[i]];
23 __attribute__((noinline, noclone)) void
24 bar (void)
26 int i;
27 for (i = 0; i < 256; i++)
29 r[i] = ((i >> 2) & (1 << (i & 3))) ? 32 + i : 32 - i;
30 q[i] = r[i] > 32 ? ((i * 7) % 256) : 258 + i;
31 p[i] = i * 11;
32 t[i] = i * 13;
34 foo ();
35 #pragma GCC novector
36 for (i = 0; i < 256; i++)
37 if ((i >> 2) & (1 << (i & 3)))
39 if (t[i] != ((i * 7) % 256) * 11)
40 abort ();
42 else if (t[i] != i * 13)
43 abort ();
46 #ifndef CHECK_H
47 int
48 main ()
50 check_vect ();
51 bar ();
52 return 0;
54 #endif