(root)/
gcc-13.2.0/
gcc/
testsuite/
gcc.target/
aarch64/
sve2/
whilewr_1.c
       1  /* { dg-do compile } */
       2  /* { dg-options "-O2 -ftree-vectorize" } */
       3  /* { dg-require-effective-target lp64 } */
       4  
       5  #include <stdint.h>
       6  
       7  #define TEST_LOOP(TYPE)						\
       8    void								\
       9    test_##TYPE (TYPE *dst, TYPE *src1, TYPE *src2, int n)	\
      10    {								\
      11      for (int i = 0; i < n; ++i)					\
      12        dst[i] = src1[i] + src2[i];				\
      13    }
      14  
      15  TEST_LOOP (int8_t);
      16  TEST_LOOP (int16_t);
      17  TEST_LOOP (int32_t);
      18  TEST_LOOP (int64_t);
      19  
      20  /* { dg-final { scan-assembler-times {\twhilewr\t} 8 } } */
      21  /* { dg-final { scan-assembler-times {\twhilewr\tp[0-9]+\.b, x1, x0\n} 1 } } */
      22  /* { dg-final { scan-assembler-times {\twhilewr\tp[0-9]+\.b, x2, x0\n} 1 } } */
      23  /* { dg-final { scan-assembler-times {\twhilewr\tp[0-9]+\.h, x1, x0\n} 1 } } */
      24  /* { dg-final { scan-assembler-times {\twhilewr\tp[0-9]+\.h, x2, x0\n} 1 } } */
      25  /* { dg-final { scan-assembler-times {\twhilewr\tp[0-9]+\.s, x1, x0\n} 1 } } */
      26  /* { dg-final { scan-assembler-times {\twhilewr\tp[0-9]+\.s, x2, x0\n} 1 } } */
      27  /* { dg-final { scan-assembler-times {\twhilewr\tp[0-9]+\.d, x1, x0\n} 1 } } */
      28  /* { dg-final { scan-assembler-times {\twhilewr\tp[0-9]+\.d, x2, x0\n} 1 } } */
      29  /* { dg-final { scan-assembler-not {\twhilerw\t} } } */