arm: fix typo in dg-require-effective-target [PR118089]
[official-gcc.git] / gcc / testsuite / gcc.dg / vect / vect-simd-clone-5.c
blobb927f6e76989b1294e24bdc4aa9176f8c15bf980
1 /* { dg-require-effective-target vect_simd_clones } */
2 /* { dg-additional-options "-fopenmp-simd" } */
3 /* { dg-additional-options "-mavx" { target avx_runtime } } */
5 #include "tree-vect.h"
7 #ifndef N
8 #define N 1024
9 #endif
11 int d[N], e[N];
13 #ifdef __aarch64__
14 #pragma omp declare simd simdlen(2) notinbranch uniform(b) linear(c:3)
15 #else
16 #pragma omp declare simd simdlen(4) notinbranch uniform(b) linear(c:3)
17 #endif
18 __attribute__((noinline)) long long int
19 foo (int a, int b, int c)
20 /* { dg-warning {unsupported simdlen 4 \(amdgcn\)} "" { target amdgcn*-*-* } .-1 } */
22 return a + b + c;
25 __attribute__((noinline, noclone)) void
26 bar ()
28 int i;
29 #pragma omp simd
30 for (i = 0; i < N; ++i)
32 d[i] = foo (i, 123, i * 3);
33 e[i] = e[i] + i;
37 int
38 main ()
40 int i;
41 check_vect ();
42 bar ();
43 #pragma GCC novector
44 for (i = 0; i < N; i++)
45 if (d[i] != i * 4 + 123 || e[i] != i)
46 abort ();
47 return 0;