(root)/
gcc-13.2.0/
gcc/
testsuite/
gcc.target/
aarch64/
sve/
cnot_1.c
       1  /* { dg-do compile } */
       2  /* { dg-options "-O2 -ftree-vectorize" } */
       3  
       4  #include <stdint.h>
       5  
       6  #define DEF_LOOP(TYPE)						\
       7    void __attribute__ ((noipa))					\
       8    test_##TYPE (TYPE *restrict r, TYPE *restrict a, int n)	\
       9    {								\
      10      for (int i = 0; i < n; ++i)					\
      11        r[i] = !a[i];						\
      12    }
      13  
      14  #define TEST_ALL(T)		\
      15    T (int8_t)			\
      16    T (int16_t)			\
      17    T (int32_t)			\
      18    T (int64_t)			\
      19    T (uint8_t)			\
      20    T (uint16_t)			\
      21    T (uint32_t)			\
      22    T (uint64_t)
      23  
      24  TEST_ALL (DEF_LOOP)
      25  
      26  /* { dg-final { scan-assembler-not {\tsel\t} } } */
      27  /* { dg-final { scan-assembler-times {\tcnot\tz[0-9]+\.b, p[0-7]/m, z[0-9]+\.b\n} 2 } } */
      28  /* { dg-final { scan-assembler-times {\tcnot\tz[0-9]+\.h, p[0-7]/m, z[0-9]+\.h\n} 2 } } */
      29  /* { dg-final { scan-assembler-times {\tcnot\tz[0-9]+\.s, p[0-7]/m, z[0-9]+\.s\n} 2 } } */
      30  /* { dg-final { scan-assembler-times {\tcnot\tz[0-9]+\.d, p[0-7]/m, z[0-9]+\.d\n} 2 } } */