[committed][RISC-V] Fix test expectations after recent late-combine changes
[official-gcc.git] / gcc / testsuite / gcc.dg / vect / vect-simd-clone-15.c
blob866f1000f34098fb578001395f4a35e29cc8c0af
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 array[N];
13 #pragma omp declare simd linear(val(b):-3), notinbranch
14 __attribute__((noinline)) int
15 foo (int a, int b)
17 return a + b;
20 __attribute__((noinline, noclone)) void
21 bar ()
23 int i;
24 #pragma omp simd
25 for (i = 0; i < N; ++i)
26 array[i] = foo (i >> 1, -i * 3);
29 int
30 main ()
32 int i;
33 check_vect ();
34 bar ();
35 #pragma GCC novector
36 for (i = 0; i < N; i++)
37 if (array[i] != ((i >> 1) + (-3 * i)))
38 abort ();
39 return 0;