(root)/
gcc-13.2.0/
gcc/
testsuite/
gcc.target/
riscv/
zbbw.c
       1  /* { dg-do compile } */
       2  /* { dg-options "-march=rv64gc_zbb -mabi=lp64" } */
       3  
       4  int
       5  clz (int i)
       6  {
       7    return __builtin_clz (i);
       8  }
       9  
      10  int
      11  ctz (int i)
      12  {
      13    return __builtin_ctz (i);
      14  }
      15  
      16  int
      17  popcount (int i)
      18  {
      19    return __builtin_popcount (i);
      20  }
      21  
      22  
      23  /* { dg-final { scan-assembler-times "clzw" 1 } } */
      24  /* { dg-final { scan-assembler-times "ctzw" 1 } } */
      25  /* { dg-final { scan-assembler-times "cpopw" 1 } } */