(root)/
gcc-13.2.0/
gcc/
testsuite/
gcc.target/
aarch64/
sve/
cond_unary_7_run.c
       1  /* { dg-do run { target { aarch64_sve_hw } } } */
       2  /* { dg-options "-O2 -ftree-vectorize" } */
       3  
       4  #include "cond_unary_7.c"
       5  
       6  #define TEST_LOOP(TYPE1, TYPE2, N, OP)				\
       7    {								\
       8      TYPE1 pred[N];						\
       9      TYPE2 r[N], a[N];						\
      10      for (int i = 0; i < N; ++i)					\
      11        {								\
      12  	a[i] = (i & 1 ? i : 3 * i) * (i % 3 == 0 ? 1 : -1);	\
      13  	pred[i] = (i % 4 < 2);					\
      14  	asm volatile ("" ::: "memory");				\
      15        }								\
      16      test_##TYPE1##_##TYPE2##_##OP (r, a, pred);			\
      17      for (int i = 0; i < N; ++i)					\
      18        if (r[i] != (pred[i] ? OP (a[i]) : 5))			\
      19  	__builtin_abort ();					\
      20    }
      21  
      22  int main ()
      23  {
      24    TEST_ALL (TEST_LOOP)
      25    return 0;
      26  }