diff options
Diffstat (limited to 'gcc/testsuite/gcc.target/mips/ext-2.c')
-rw-r--r-- | gcc/testsuite/gcc.target/mips/ext-2.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.target/mips/ext-2.c b/gcc/testsuite/gcc.target/mips/ext-2.c new file mode 100644 index 000000000..8d502b21b --- /dev/null +++ b/gcc/testsuite/gcc.target/mips/ext-2.c @@ -0,0 +1,14 @@ +/* Turn the truncate,zero_extend,lshiftrt sequence before the or into a + zero_extract. The truncate is due to TARGET_PROMOTE_PROTOTYPES, the + zero_extend to PROMOTE_MODE. */ +/* { dg-do compile } */ +/* { dg-options "-O isa_rev>=2 -mgp64" } */ +/* { dg-final { scan-assembler "\tdext\t" } } */ +/* { dg-final { scan-assembler-not "and" } } */ +/* { dg-final { scan-assembler-not "srl" } } */ + +void +f (unsigned char x, unsigned char *r) +{ + *r = 0x50 | (x >> 4); +} |