(root)/
gcc-13.2.0/
gcc/
testsuite/
gcc.target/
aarch64/
sve/
pcs/
gnu_vectors_2.c
       1  /* { dg-options "-O -msve-vector-bits=256 -fomit-frame-pointer" } */
       2  
       3  #include <arm_sve.h>
       4  
       5  typedef bfloat16_t bfloat16x16_t __attribute__((vector_size (32)));
       6  typedef float16_t float16x16_t __attribute__((vector_size (32)));
       7  typedef float32_t float32x8_t __attribute__((vector_size (32)));
       8  typedef float64_t float64x4_t __attribute__((vector_size (32)));
       9  typedef int8_t int8x32_t __attribute__((vector_size (32)));
      10  typedef int16_t int16x16_t __attribute__((vector_size (32)));
      11  typedef int32_t int32x8_t __attribute__((vector_size (32)));
      12  typedef int64_t int64x4_t __attribute__((vector_size (32)));
      13  typedef uint8_t uint8x32_t __attribute__((vector_size (32)));
      14  typedef uint16_t uint16x16_t __attribute__((vector_size (32)));
      15  typedef uint32_t uint32x8_t __attribute__((vector_size (32)));
      16  typedef uint64_t uint64x4_t __attribute__((vector_size (32)));
      17  
      18  void bfloat16_callee (svbfloat16_t);
      19  void float16_callee (svfloat16_t);
      20  void float32_callee (svfloat32_t);
      21  void float64_callee (svfloat64_t);
      22  void int8_callee (svint8_t);
      23  void int16_callee (svint16_t);
      24  void int32_callee (svint32_t);
      25  void int64_callee (svint64_t);
      26  void uint8_callee (svuint8_t);
      27  void uint16_callee (svuint16_t);
      28  void uint32_callee (svuint32_t);
      29  void uint64_callee (svuint64_t);
      30  
      31  void
      32  bfloat16_caller (bfloat16x16_t arg)
      33  {
      34    bfloat16_callee (arg);
      35  }
      36  
      37  void
      38  float16_caller (float16x16_t arg)
      39  {
      40    float16_callee (arg);
      41  }
      42  
      43  void
      44  float32_caller (float32x8_t arg)
      45  {
      46    float32_callee (arg);
      47  }
      48  
      49  void
      50  float64_caller (float64x4_t arg)
      51  {
      52    float64_callee (arg);
      53  }
      54  
      55  void
      56  int8_caller (int8x32_t arg)
      57  {
      58    int8_callee (arg);
      59  }
      60  
      61  void
      62  int16_caller (int16x16_t arg)
      63  {
      64    int16_callee (arg);
      65  }
      66  
      67  void
      68  int32_caller (int32x8_t arg)
      69  {
      70    int32_callee (arg);
      71  }
      72  
      73  void
      74  int64_caller (int64x4_t arg)
      75  {
      76    int64_callee (arg);
      77  }
      78  
      79  void
      80  uint8_caller (uint8x32_t arg)
      81  {
      82    uint8_callee (arg);
      83  }
      84  
      85  void
      86  uint16_caller (uint16x16_t arg)
      87  {
      88    uint16_callee (arg);
      89  }
      90  
      91  void
      92  uint32_caller (uint32x8_t arg)
      93  {
      94    uint32_callee (arg);
      95  }
      96  
      97  void
      98  uint64_caller (uint64x4_t arg)
      99  {
     100    uint64_callee (arg);
     101  }
     102  
     103  /* { dg-final { scan-assembler-times {\tld1b\tz0\.b, p[0-7]/z, \[x0\]} 2 } } */
     104  /* { dg-final { scan-assembler-times {\tld1h\tz0\.h, p[0-7]/z, \[x0\]} 4 } } */
     105  /* { dg-final { scan-assembler-times {\tld1w\tz0\.s, p[0-7]/z, \[x0\]} 3 } } */
     106  /* { dg-final { scan-assembler-times {\tld1d\tz0\.d, p[0-7]/z, \[x0\]} 3 } } */
     107  /* { dg-final { scan-assembler-not {\tst1[bhwd]\t} } } */