(root)/
gcc-13.2.0/
gcc/
testsuite/
gcc.target/
aarch64/
sve/
vcond_20_run.c
       1  /* { dg-do run { target aarch64_sve_hw } } */
       2  /* { dg-options "-O2 -ftree-vectorize" } */
       3  
       4  #include "vcond_20.c"
       5  
       6  #define N 97
       7  
       8  #define TEST_LOOP(TYPE, NAME, CONST)				\
       9    {								\
      10      TYPE x[N], pred[N];						\
      11      for (int i = 0; i < N; ++i)					\
      12        {								\
      13  	pred[i] = i % 5 <= i % 6;				\
      14  	asm volatile ("" ::: "memory");				\
      15        }								\
      16      test_##TYPE##_##NAME (x, pred, N);				\
      17      for (int i = 0; i < N; ++i)					\
      18        {								\
      19  	if (x[i] != (TYPE) (pred[i] > 0 ? CONST : 12.0))	\
      20  	  __builtin_abort ();					\
      21  	asm volatile ("" ::: "memory");				\
      22        }								\
      23    }
      24  
      25  int __attribute__ ((optimize (1)))
      26  main (int argc, char **argv)
      27  {
      28    TEST_ALL (TEST_LOOP)
      29    return 0;
      30  }