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