aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorRichard Sandiford <rsandifo@nildram.co.uk>2007-10-15 20:27:24 +0000
committerRichard Sandiford <rsandifo@gcc.gnu.org>2007-10-15 20:27:24 +0000
commit6b2fe1bcaf0005dbebb838aced50ea2b281645ff (patch)
tree2fd95eb3310e9099a31402ce411017b9a21a17e1 /gcc
parentadb417d78cd7c3d95622e82091b6fa5932c08c3d (diff)
downloadgcc-6b2fe1bcaf0005dbebb838aced50ea2b281645ff.zip
gcc-6b2fe1bcaf0005dbebb838aced50ea2b281645ff.tar.gz
gcc-6b2fe1bcaf0005dbebb838aced50ea2b281645ff.tar.bz2
dse-1.c: Pass the union as a second parameter to each function.
gcc/testsuite/ * gcc.target/mips/dse-1.c: Pass the union as a second parameter to each function. Check that there are no unsigned loads. From-SVN: r129369
Diffstat (limited to 'gcc')
-rw-r--r--gcc/testsuite/ChangeLog5
-rw-r--r--gcc/testsuite/gcc.target/mips/dse-1.c15
2 files changed, 14 insertions, 6 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index 63f57c4..791b6e1 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -1,3 +1,8 @@
+2007-10-15 Richard Sandiford <rsandifo@nildram.co.uk>
+
+ * gcc.target/mips/dse-1.c: Pass the union as a second parameter
+ to each function. Check that there are no unsigned loads.
+
2007-10-15 Jakub Jelinek <jakub@redhat.com>
PR tree-optimization/33136
diff --git a/gcc/testsuite/gcc.target/mips/dse-1.c b/gcc/testsuite/gcc.target/mips/dse-1.c
index a2b8445..0491265 100644
--- a/gcc/testsuite/gcc.target/mips/dse-1.c
+++ b/gcc/testsuite/gcc.target/mips/dse-1.c
@@ -1,19 +1,19 @@
/* { dg-mips-options "-mgp64 -O" } */
#define TEST(ID, TYPE1, TYPE2) \
- union { \
+ union u##ID { \
TYPE1 m1[sizeof (TYPE2) / sizeof (TYPE1)]; \
TYPE2 m2; \
- } u##ID; \
+ }; \
\
/* The MIPS16 versions of the shifts we need are too \
expensive. */ \
TYPE1 __attribute__((nomips16)) \
- f##ID (TYPE2 x) \
+ f##ID (TYPE2 x, union u##ID *u) \
{ \
- u##ID.m2 = x; \
- return (u##ID.m1[0] \
- + u##ID.m1[sizeof (TYPE2) / sizeof (TYPE1) - 1]); \
+ u->m2 = x; \
+ return (u->m1[0] \
+ + u->m1[sizeof (TYPE2) / sizeof (TYPE1) - 1]); \
}
TEST (1, unsigned int, unsigned long long);
@@ -32,5 +32,8 @@ TEST (10, signed char, int);
(char, short) tests won't pass. */
/* { dg-final { scan-assembler-not "\tlh\t" } } */
+/* { dg-final { scan-assembler-not "\tlhu\t" } } */
/* { dg-final { scan-assembler-not "\tlw\t" } } */
+/* { dg-final { scan-assembler-not "\tlwu\t" } } */
/* { dg-final { scan-assembler-not "\tlb\t" } } */
+/* { dg-final { scan-assembler-not "\tlbu\t" } } */