(root)/
gcc-13.2.0/
gcc/
testsuite/
gcc.target/
arm/
vect_binary_1.c
       1  /* { dg-do compile { target { arm*-*-* } } } */
       2  /* { dg-require-effective-target arm_hard_ok } */
       3  /* { dg-require-effective-target arm_v8_neon_ok } */
       4  /* { dg-add-options arm_v8_neon }  */
       5  /* { dg-additional-options "-O3 -mfloat-abi=hard" } */
       6  /* { dg-final { check-function-bodies "**" "" "" } } */
       7  
       8  #include <stdint.h>
       9  
      10  #define TEST2(OUT, NAME, IN)						\
      11  OUT __attribute__((vector_size(sizeof(OUT) * 2)))			\
      12  test2_##OUT##_##NAME##_##IN (float dummy,				\
      13  			     IN __attribute__((vector_size(sizeof(IN) * 2))) y, \
      14  			     IN __attribute__((vector_size(sizeof(IN) * 2))) z) \
      15  {									\
      16    OUT __attribute__((vector_size(sizeof(OUT) * 2))) x;			\
      17    x[0] = __builtin_##NAME (y[0], z[0]);					\
      18    x[1] = __builtin_##NAME (y[1], z[1]);					\
      19    return x;								\
      20  }
      21  
      22  #define TEST4(OUT, NAME, IN)						\
      23  OUT __attribute__((vector_size(sizeof(OUT) * 4)))			\
      24  test4_##OUT##_##NAME##_##IN (float dummy,				\
      25  			     IN __attribute__((vector_size(sizeof(OUT) * 4))) y,	\
      26  			     IN __attribute__((vector_size(sizeof(OUT) * 4))) z)	\
      27  {									\
      28    OUT __attribute__((vector_size(sizeof(OUT) * 4))) x;			\
      29    x[0] = __builtin_##NAME (y[0], z[0]);					\
      30    x[1] = __builtin_##NAME (y[1], z[1]);					\
      31    x[2] = __builtin_##NAME (y[2], z[2]);					\
      32    x[3] = __builtin_##NAME (y[3], z[3]);					\
      33    return x;								\
      34  }
      35  
      36  /*
      37  ** test2_float_copysignf_float: { target arm_little_endian }
      38  **	vmov.i32	d0, #(0x80000000|2147483648)(\s+.*)
      39  **	vbsl	d0, d2, d1
      40  **	bx	lr
      41  */
      42  TEST2 (float, copysignf, float)
      43  
      44  /*
      45  ** test4_float_copysignf_float: { target arm_little_endian }
      46  **	vmov.i32	q0, #(0x80000000|2147483648)(\s+.*)
      47  **	vbsl	q0, q2, q1
      48  **	bx	lr
      49  */
      50  TEST4 (float, copysignf, float)