diff options
Diffstat (limited to 'gcc/testsuite/gcc.target/mips/truncate-5.c')
-rw-r--r-- | gcc/testsuite/gcc.target/mips/truncate-5.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.target/mips/truncate-5.c b/gcc/testsuite/gcc.target/mips/truncate-5.c new file mode 100644 index 000000000..6cdb7f71e --- /dev/null +++ b/gcc/testsuite/gcc.target/mips/truncate-5.c @@ -0,0 +1,15 @@ +/* If we AND in DI mode (i.e. replace the order of TRUNCATE and AND) then we + can remove the TRUNCATE. */ +/* { dg-options "-O -mgp64" } */ +/* { dg-final { scan-assembler-not "\tsll\t\[^\n\]*,0" } } */ + +struct s +{ + unsigned a:5; +}; + +NOMIPS16 void +f (struct s *s, unsigned long long a) +{ + s->a = a & 0x3; +} |