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