diff options
Diffstat (limited to 'gcc/testsuite/gcc.target/arm/ctz.c')
-rw-r--r-- | gcc/testsuite/gcc.target/arm/ctz.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.target/arm/ctz.c b/gcc/testsuite/gcc.target/arm/ctz.c new file mode 100644 index 00000000000..63e9d0266d2 --- /dev/null +++ b/gcc/testsuite/gcc.target/arm/ctz.c @@ -0,0 +1,12 @@ +/* { dg-do compile } */ +/* { dg-require-effective-target arm32 } */ +/* { dg-options "-O2 -march=armv6t2" } */ + +unsigned int functest(unsigned int x) +{ + return __builtin_ctz(x); +} + +/* { dg-final { scan-assembler "rbit" } } */ +/* { dg-final { scan-assembler "clz" } } */ +/* { dg-final { scan-assembler-not "rsb" } } */ |