aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAldy Hernandez <aldyh@redhat.com>2005-01-11 21:56:51 +0000
committerAldy Hernandez <aldyh@redhat.com>2005-01-11 21:56:51 +0000
commit9b7c2520af03f73ecd2d49a071176aadf1fb8746 (patch)
tree8136adf3d0e1f04c5a170e72847316b77507640b
parentbd94f5f8a4de540f61c3d2a1e6038b1a176b1b01 (diff)
* regrename.c (kill_value): Handle subreg's that won't simplify.
git-svn-id: https://gcc.gnu.org/svn/gcc/branches/gcc-3_4-e500-branch@93201 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r--gcc/ChangeLog.e5004
-rw-r--r--gcc/regrename.c13
2 files changed, 11 insertions, 6 deletions
diff --git a/gcc/ChangeLog.e500 b/gcc/ChangeLog.e500
index d26bf37a3c1..065feda2c48 100644
--- a/gcc/ChangeLog.e500
+++ b/gcc/ChangeLog.e500
@@ -1,3 +1,7 @@
+2005-01-11 Aldy Hernandez <aldyh@redhat.com>
+
+ * regrename.c (kill_value): Handle subreg's that won't simplify.
+
2004-12-16 Richard Henderson <rth@redhat.com>
Aldy Hernandez <aldyh@redhat.com>
diff --git a/gcc/regrename.c b/gcc/regrename.c
index e725ee932da..cbfa1dcf858 100644
--- a/gcc/regrename.c
+++ b/gcc/regrename.c
@@ -1073,14 +1073,15 @@ kill_value_regno (unsigned int regno, struct value_data *vd)
static void
kill_value (rtx x, struct value_data *vd)
{
- /* SUBREGS are supposed to have been eliminated by now. But some
- ports, e.g. i386 sse, use them to smuggle vector type information
- through to instruction selection. Each such SUBREG should simplify,
- so if we get a NULL we've done something wrong elsewhere. */
+ rtx orig_rtx = x;
if (GET_CODE (x) == SUBREG)
- x = simplify_subreg (GET_MODE (x), SUBREG_REG (x),
- GET_MODE (SUBREG_REG (x)), SUBREG_BYTE (x));
+ {
+ x = simplify_subreg (GET_MODE (x), SUBREG_REG (x),
+ GET_MODE (SUBREG_REG (x)), SUBREG_BYTE (x));
+ if (x == NULL_RTX)
+ x = SUBREG_REG (orig_rtx);
+ }
if (REG_P (x))
{
unsigned int regno = REGNO (x);