diff options
author | nemet <nemet@138bc75d-0d04-0410-961f-82ee72b054a4> | 2009-07-18 21:46:01 +0000 |
---|---|---|
committer | nemet <nemet@138bc75d-0d04-0410-961f-82ee72b054a4> | 2009-07-18 21:46:01 +0000 |
commit | 5b46cc62ce28f594560412cc42a87db3a9e8795a (patch) | |
tree | a58b9ea723f1b744b052635b30e5dc9e99b20305 /gcc/testsuite | |
parent | 7dd8ea06a963103de07fd32b5c1d8c1f40c41f21 (diff) | |
download | gcc-5b46cc62ce28f594560412cc42a87db3a9e8795a.tar.gz |
* combine.c (simplify_shift_const_1): Split code to determine
shift_mode into ...
(try_widen_shift_mode): ... here. Allow widening for ASHIFTRT if the
new bits shifted in are identical to the old sign bit.
testsuite/
* gcc.target/mips/octeon-exts-7.c: New test.
* gcc.target/mips/octeon-exts-2.c: Revert previous change.
* gcc.target/mips/octeon-exts-5.c: Likewise.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@149778 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/testsuite')
-rw-r--r-- | gcc/testsuite/ChangeLog | 6 | ||||
-rw-r--r-- | gcc/testsuite/gcc.target/mips/octeon-exts-2.c | 5 | ||||
-rw-r--r-- | gcc/testsuite/gcc.target/mips/octeon-exts-5.c | 5 | ||||
-rw-r--r-- | gcc/testsuite/gcc.target/mips/octeon-exts-7.c | 17 |
4 files changed, 27 insertions, 6 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index ac30e5b0048..3200817c4e1 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,9 @@ +2009-07-18 Adam Nemet <anemet@caviumnetworks.com> + + * gcc.target/mips/octeon-exts-7.c: New test. + * gcc.target/mips/octeon-exts-2.c: Revert previous change. + * gcc.target/mips/octeon-exts-5.c: Likewise. + 2009-07-18 Richard Guenther <rguenther@suse.de> PR testsuite/40798 diff --git a/gcc/testsuite/gcc.target/mips/octeon-exts-2.c b/gcc/testsuite/gcc.target/mips/octeon-exts-2.c index 42f2a3f8586..fc5df639d02 100644 --- a/gcc/testsuite/gcc.target/mips/octeon-exts-2.c +++ b/gcc/testsuite/gcc.target/mips/octeon-exts-2.c @@ -1,7 +1,6 @@ /* { dg-do compile } */ -/* { dg-options "-O -march=octeon -meb -dp" } */ -/* Don't match exts in sign-extension. */ -/* { dg-final { scan-assembler-times "\texts\t\[^\\n\]*extv" 4 } } */ +/* { dg-options "-O -march=octeon -meb" } */ +/* { dg-final { scan-assembler-times "\texts\t" 4 } } */ struct bar { diff --git a/gcc/testsuite/gcc.target/mips/octeon-exts-5.c b/gcc/testsuite/gcc.target/mips/octeon-exts-5.c index 6ec7ac7296f..e7a4738b96f 100644 --- a/gcc/testsuite/gcc.target/mips/octeon-exts-5.c +++ b/gcc/testsuite/gcc.target/mips/octeon-exts-5.c @@ -1,8 +1,7 @@ /* -mel version of octeon-exts-2.c. */ /* { dg-do compile } */ -/* { dg-options "-O -march=octeon -mel -dp" } */ -/* Don't match exts in sign-extension. */ -/* { dg-final { scan-assembler-times "\texts\t\[^\\n\]*extv" 4 } } */ +/* { dg-options "-O -march=octeon -mel" } */ +/* { dg-final { scan-assembler-times "\texts\t" 4 } } */ struct bar { diff --git a/gcc/testsuite/gcc.target/mips/octeon-exts-7.c b/gcc/testsuite/gcc.target/mips/octeon-exts-7.c new file mode 100644 index 00000000000..04805d06de4 --- /dev/null +++ b/gcc/testsuite/gcc.target/mips/octeon-exts-7.c @@ -0,0 +1,17 @@ +/* Remove the redundant sign-extension after the sign-extraction. */ +/* { dg-do compile } */ +/* { dg-options "-O -march=octeon -mgp64" } */ +/* { dg-final { scan-assembler-times "\texts\t" 1 } } */ +/* { dg-final { scan-assembler-not "sll|sra" } } */ + +struct bar +{ + long long a:18; + long long b:14; +}; + +NOMIPS16 int +f1 (struct bar *s) +{ + return s->b; +} |