summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.target/aarch64/ctz.c
blob: 89d6fb442bf6236f6390866602cbd6e79145969b (plain)
1
2
3
4
5
6
7
8
9
10
11
/* { dg-do compile } */
/* { dg-options "-O2" } */

unsigned int functest (unsigned int x)
{
  return __builtin_ctz (x);
}

/* { dg-final { scan-assembler "rbit\tw" } } */
/* { dg-final { scan-assembler "clz\tw" } } */