On Mon, May 27, 2024 at 10:36:25AM +0530, Tejas Belagod wrote: > This patch adds a test to test depend clause and its various dependency > variations with SVE type objects. > > gcc/testsuite/ChangeLog > > * gcc.target/aarch64/sve/omp/depend-1.c: New test. > --- > .../gcc.target/aarch64/sve/omp/depend-1.c | 223 ++++++++++++++++++ > 1 file changed, 223 insertions(+) > create mode 100644 gcc/testsuite/gcc.target/aarch64/sve/omp/depend-1.c > > diff --git a/gcc/testsuite/gcc.target/aarch64/sve/omp/depend-1.c > b/gcc/testsuite/gcc.target/aarch64/sve/omp/depend-1.c > new file mode 100644 > index 00000000000..734c20fb9ae > --- /dev/null > +++ b/gcc/testsuite/gcc.target/aarch64/sve/omp/depend-1.c > @@ -0,0 +1,223 @@ > +/* { dg-do run { target aarch64_sve256_hw } } */ > +/* { dg-options "-msve-vector-bits=256 -std=gnu99 -fopenmp -O2 > -fdump-tree-ompexp" } */ > + > +#include <arm_sve.h> > + > +int zeros[8] = { 0, 0, 0, 0, 0, 0, 0, 0}; > +int ones[8] = { 1, 1, 1, 1, 1, 1, 1, 1 }; > +int twos[8] = { 2, 2, 2, 2, 2, 2, 2, 2 }; > + > +void > +dep (void) > +{ > + svint32_t x = svld1_s32 (svptrue_b32 (), ones); > + > + #pragma omp parallel > + #pragma omp single > + { > + #pragma omp task shared (x) depend(out: x) > + x = svld1_s32 (svptrue_b32 (), twos); > + #pragma omp task shared (x) depend(in: x) > + if (svptest_any (svptrue_b32(), svcmpne_n_s32 (svptrue_b32 (), x, 2))) > + __builtin_abort ();
Why the 2 spaces before () (several times)? Otherwise LGTM, but see the earlier questions on where to put the tests. Jakub