[AArch64/arm] PR testsuite/85326 Avoid C++ tests when C++ compiler not present
[official-gcc.git] / gcc / testsuite / gcc.target / powerpc / ctz-1.c
blob9948ad7555b36c4cfe2eb30e10193bf80beb6f90
1 /* { dg-do compile { target { powerpc*-*-* && lp64 } } } */
2 /* { dg-require-effective-target powerpc_p9modulo_ok } */
3 /* { dg-skip-if "do not override -mcpu" { powerpc*-*-* } { "-mcpu=*" } { "-mcpu=power9" } } */
4 /* { dg-options "-mcpu=power9 -O2" } */
6 int i_trailing_zero (int a) { return __builtin_ctz (a); }
7 int l_trailing_zero (long a) { return __builtin_ctzl (a); }
8 int ll_trailing_zero (long long a) { return __builtin_ctzll (a); }
10 /* { dg-final { scan-assembler "cnttzw " } } */
11 /* { dg-final { scan-assembler "cnttzd " } } */
12 /* { dg-final { scan-assembler-not "cntlzw " } } */
13 /* { dg-final { scan-assembler-not "cntlzd " } } */