diff options
Diffstat (limited to 'gcc-4.9/gcc/testsuite/gcc.target/mips/octeon-bbit-2.c')
-rw-r--r-- | gcc-4.9/gcc/testsuite/gcc.target/mips/octeon-bbit-2.c | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/gcc-4.9/gcc/testsuite/gcc.target/mips/octeon-bbit-2.c b/gcc-4.9/gcc/testsuite/gcc.target/mips/octeon-bbit-2.c new file mode 100644 index 000000000..7e78d70e7 --- /dev/null +++ b/gcc-4.9/gcc/testsuite/gcc.target/mips/octeon-bbit-2.c @@ -0,0 +1,24 @@ +/* { dg-do compile } */ +/* { dg-options "-march=octeon -mbranch-likely -fno-unroll-loops" } */ +/* { dg-skip-if "code quality test" { *-*-* } { "-O0" } { "" } } */ +/* { dg-final { scan-assembler "\tbbit\[01\]\t" } } */ +/* { dg-final { scan-assembler-not "\tbbit\[01\]l\t" } } */ +/* { dg-final { scan-assembler "\tbnel\t" } } */ + +NOMIPS16 int +f (int *a, int *b) +{ + do + if (__builtin_expect (*a & 1, 1)) + *a = 0; + while (++a < b); +} + +NOMIPS16 int +g (int *a, int *b) +{ + do + if (__builtin_expect (*a == 3, 1)) + *a = 0; + while (++a < b); +} |