(root)/
gcc-13.2.0/
gcc/
testsuite/
gcc.target/
aarch64/
vec-init-17.c
       1  /* { dg-do compile } */
       2  /* { dg-options "-O" } */
       3  /* { dg-final { check-function-bodies "**" "" "" { target lp64 } } } */
       4  
       5  #include <arm_neon.h>
       6  
       7  /*
       8  ** s32_1:
       9  **	fmov	s0, w0
      10  **	ret
      11  */
      12  int32x2_t s32_1(int32_t a0) {
      13    if (__BYTE_ORDER__ == __ORDER_BIG_ENDIAN__)
      14      return (int32x2_t) { 0, a0 };
      15    else
      16      return (int32x2_t) { a0, 0 };
      17  }
      18  /*
      19  ** s32_2:
      20  **	ldr	s0, \[x0\]
      21  **	ret
      22  */
      23  int32x2_t s32_2(int32_t *ptr) {
      24    if (__BYTE_ORDER__ == __ORDER_BIG_ENDIAN__)
      25      return (int32x2_t) { 0, ptr[0] };
      26    else
      27      return (int32x2_t) { ptr[0], 0 };
      28  }
      29  /*
      30  ** s32_3:
      31  **	ldr	s0, \[x0, #?4\]
      32  **	ret
      33  */
      34  int32x2_t s32_3(int32_t *ptr) {
      35    if (__BYTE_ORDER__ == __ORDER_BIG_ENDIAN__)
      36      return (int32x2_t) { 0, ptr[1] };
      37    else
      38      return (int32x2_t) { ptr[1], 0 };
      39  }
      40  
      41  /*
      42  ** f32_1:
      43  **	fmov	s0, s0
      44  **	ret
      45  */
      46  float32x2_t f32_1(float32_t a0) {
      47    if (__BYTE_ORDER__ == __ORDER_BIG_ENDIAN__)
      48      return (float32x2_t) { 0, a0 };
      49    else
      50      return (float32x2_t) { a0, 0 };
      51  }
      52  /*
      53  ** f32_2:
      54  **	ldr	s0, \[x0\]
      55  **	ret
      56  */
      57  float32x2_t f32_2(float32_t *ptr) {
      58    if (__BYTE_ORDER__ == __ORDER_BIG_ENDIAN__)
      59      return (float32x2_t) { 0, ptr[0] };
      60    else
      61      return (float32x2_t) { ptr[0], 0 };
      62  }
      63  /*
      64  ** f32_3:
      65  **	ldr	s0, \[x0, #?4\]
      66  **	ret
      67  */
      68  float32x2_t f32_3(float32_t *ptr) {
      69    if (__BYTE_ORDER__ == __ORDER_BIG_ENDIAN__)
      70      return (float32x2_t) { 0, ptr[1] };
      71    else
      72      return (float32x2_t) { ptr[1], 0 };
      73  }