(root)/
gcc-13.2.0/
gcc/
testsuite/
gcc.target/
aarch64/
ldar_2.c
       1  /* Test that the zero-extending patterns for LDAR are used.  */
       2  /* { dg-do compile } */
       3  /* { dg-options "-O2" } */
       4  
       5  #include <stdint.h>
       6  
       7  uint8_t v_uint8_t;
       8  uint16_t v_uint16_t;
       9  uint32_t v_uint32_t;
      10  uint64_t v_uint64_t;
      11  
      12  #define FUNC(FROM, TO)						\
      13  TO								\
      14  load_##FROM##_ext_##TO (void)					\
      15  {								\
      16    return __atomic_load_n (&v_##FROM, __ATOMIC_ACQUIRE);		\
      17  }
      18  
      19  FUNC (uint8_t, uint16_t)
      20  FUNC (uint8_t, uint32_t)
      21  FUNC (uint8_t, uint64_t)
      22  FUNC (uint16_t, uint32_t)
      23  FUNC (uint16_t, uint64_t)
      24  FUNC (uint32_t, uint64_t)
      25  
      26  /* { dg-final { scan-assembler-not {and\tw[0-9+], w[0-9]+, 255} } } */
      27  /* { dg-final { scan-assembler-not {uxtw\tx[0-9+], w[0-9]+} } } */