]> git.ipfire.org Git - thirdparty/gcc.git/blob - gcc/testsuite/g++.dg/vect/simd-clone-3.cc
gcc/
[thirdparty/gcc.git] / gcc / testsuite / g++.dg / vect / simd-clone-3.cc
1 // { dg-require-effective-target vect_simd_clones }
2 // { dg-additional-options "-fopenmp-simd -fno-inline" }
3 // { dg-additional-options "-mavx" { target avx_runtime } }
4 // { dg-additional-sources "simd-clone-2.cc" }
5
6 #include "simd-clone-2.h"
7
8 #pragma omp declare simd notinbranch
9 int
10 S::f0 (int x)
11 {
12 return x + s;
13 }
14
15 #pragma omp declare simd notinbranch uniform(this)
16 int
17 S::f1 (int x)
18 {
19 return x + s;
20 }
21
22 #pragma omp declare simd notinbranch linear(this:sizeof(this)/sizeof(this))
23 int
24 S::f2 (int x)
25 {
26 return x + this->S::s;
27 }
28
29 #pragma omp declare simd uniform(this) aligned(this:32) linear(x)
30 int
31 T::f3 (int x)
32 {
33 return t[x];
34 }