(root)/
gcc-13.2.0/
gcc/
testsuite/
gcc.target/
aarch64/
sve/
mls_2.c
       1  /* { dg-do assemble { target aarch64_asm_sve_ok } } */
       2  /* { dg-options "-O -msve-vector-bits=2048 -save-temps" } */
       3  
       4  #include <stdint.h>
       5  
       6  #define TEST_OP(TYPE) \
       7    TYPE \
       8    test##_##TYPE##_##AMT (TYPE a, TYPE b, TYPE c) \
       9    { \
      10      return a - b * c; \
      11    }
      12  
      13  #define TEST_TYPE(TYPE, SIZE) \
      14    typedef TYPE TYPE##SIZE __attribute__((vector_size(SIZE))); \
      15    TEST_OP (TYPE##SIZE)
      16  
      17  TEST_TYPE (int8_t, 32)
      18  TEST_TYPE (uint8_t, 32)
      19  
      20  TEST_TYPE (int8_t, 64)
      21  TEST_TYPE (uint8_t, 64)
      22  TEST_TYPE (int16_t, 64)
      23  TEST_TYPE (uint16_t, 64)
      24  
      25  TEST_TYPE (int8_t, 128)
      26  TEST_TYPE (uint8_t, 128)
      27  TEST_TYPE (int16_t, 128)
      28  TEST_TYPE (uint16_t, 128)
      29  TEST_TYPE (int32_t, 128)
      30  TEST_TYPE (uint32_t, 128)
      31  
      32  /* { dg-final { scan-assembler-times {\t(?:mls|msb)\tz[0-9]+\.b,} 6 } } */
      33  /* { dg-final { scan-assembler-times {\t(?:mls|msb)\tz[0-9]+\.h,} 4 } } */
      34  /* { dg-final { scan-assembler-times {\t(?:mls|msb)\tz[0-9]+\.s,} 2 } } */