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