aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorHans-Peter Nilsson <hp@axis.com>2004-10-13 23:32:15 +0000
committerHans-Peter Nilsson <hp@gcc.gnu.org>2004-10-13 23:32:15 +0000
commit5a78838a41403815e2b68eace9ea59db4baff54e (patch)
tree7a7ce70020f908634a4e32fc43d66e8d28761033 /gcc
parent61f03abaa5aabfabc4aaf73df1a19960f1239a89 (diff)
downloadgcc-5a78838a41403815e2b68eace9ea59db4baff54e.zip
gcc-5a78838a41403815e2b68eace9ea59db4baff54e.tar.gz
gcc-5a78838a41403815e2b68eace9ea59db4baff54e.tar.bz2
re PR target/17984 (Recent peephole2:s may cause internal compiler errors (2))
PR target/17984 * gcc.dg/cris-peep2-xsrand2.c: New test. From-SVN: r89010
Diffstat (limited to 'gcc')
-rw-r--r--gcc/testsuite/ChangeLog5
-rw-r--r--gcc/testsuite/gcc.dg/cris-peep2-xsrand2.c34
2 files changed, 39 insertions, 0 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index a861780..339f775 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -1,3 +1,8 @@
+2004-10-14 Hans-Peter Nilsson <hp@axis.com>
+
+ PR target/17984
+ * gcc.dg/cris-peep2-xsrand2.c: New test.
+
2004-10-13 Andrew Pinski <pinskia@physics.uc.edu>
PR c++/17661
diff --git a/gcc/testsuite/gcc.dg/cris-peep2-xsrand2.c b/gcc/testsuite/gcc.dg/cris-peep2-xsrand2.c
new file mode 100644
index 0000000..30679b2
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/cris-peep2-xsrand2.c
@@ -0,0 +1,34 @@
+/* { dg-do compile { target cris-*-* } } */
+/* { dg-final { scan-assembler "and.w -137," } } */
+/* { dg-final { scan-assembler "and.b -64," } } */
+/* { dg-final { scan-assembler "and.w -139," } } */
+/* { dg-final { scan-assembler "and.b -63," } } */
+/* { dg-final { scan-assembler-not "and.d" } } */
+/* { dg-options "-O2" } */
+
+/* PR target/17984. Test-case based on
+ testsuite/gcc.dg/cris-peep2-xsrand.c. */
+
+unsigned int
+andwlsr (unsigned int x)
+{
+ return (x >> 16) & 0xff77;
+}
+
+unsigned int
+andblsr (unsigned int x)
+{
+ return (x >> 24) & 0xc0;
+}
+
+int
+andwasr (int x)
+{
+ return (x >> 16) & 0xff75;
+}
+
+int
+andbasr (int x)
+{
+ return (x >> 24) & 0xc1;
+}