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