Debian Codegraph @

gcc/testsuite/gcc.target/powerpc/ctz-1.c

raw
1 /* { dg-do compile { target { powerpc*-*-* && lp64 } } } */
2 /* { dg-require-effective-target powerpc_p9modulo_ok } */
3 /* { dg-options "-mdejagnu-cpu=power9 -O2" } */
4
5 int i_trailing_zero (int a) { return __builtin_ctz (a); }
6 int l_trailing_zero (long a) { return __builtin_ctzl (a); }
7 int ll_trailing_zero (long long a) { return __builtin_ctzll (a); }
8
9 /* { dg-final { scan-assembler "cnttzw " } } */
10 /* { dg-final { scan-assembler "cnttzd " } } */
11 /* { dg-final { scan-assembler-not "cntlzw " } } */
12 /* { dg-final { scan-assembler-not "cntlzd " } } */