summaryrefslogtreecommitdiff
path: root/gcc/jump.c
diff options
context:
space:
mode:
authorjsm28 <jsm28@138bc75d-0d04-0410-961f-82ee72b054a4>2008-08-06 15:20:14 +0000
committerjsm28 <jsm28@138bc75d-0d04-0410-961f-82ee72b054a4>2008-08-06 15:20:14 +0000
commit62e423241b25fe595c15c14cb3e5f6434a037f48 (patch)
treeb10889a27b1cc0c2c180bc4ea92acf3aa3f1f998 /gcc/jump.c
parentd62f29b264a323ae7b4b194d0c96aee701acfbf8 (diff)
downloadgcc-62e423241b25fe595c15c14cb3e5f6434a037f48.tar.gz
* jump.c (rtx_renumbered_equal_p): Do not call subreg_regno_offset
for unrepresentable subregs or treat them as equal to other regs or subregs with the same register number. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@138804 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/jump.c')
-rw-r--r--gcc/jump.c20
1 files changed, 20 insertions, 0 deletions
diff --git a/gcc/jump.c b/gcc/jump.c
index 595363b1adb..c0ab6909a2a 100644
--- a/gcc/jump.c
+++ b/gcc/jump.c
@@ -1552,12 +1552,22 @@ rtx_renumbered_equal_p (const_rtx x, const_rtx y)
if (reg_renumber[reg_x] >= 0)
{
+ if (!subreg_offset_representable_p (reg_renumber[reg_x],
+ GET_MODE (SUBREG_REG (x)),
+ byte_x,
+ GET_MODE (x)))
+ return 0;
reg_x = subreg_regno_offset (reg_renumber[reg_x],
GET_MODE (SUBREG_REG (x)),
byte_x,
GET_MODE (x));
byte_x = 0;
}
+ else if (!subreg_offset_representable_p (reg_x,
+ GET_MODE (SUBREG_REG (x)),
+ byte_x,
+ GET_MODE (x)))
+ return 0;
}
else
{
@@ -1573,12 +1583,22 @@ rtx_renumbered_equal_p (const_rtx x, const_rtx y)
if (reg_renumber[reg_y] >= 0)
{
+ if (!subreg_offset_representable_p (reg_renumber[reg_y],
+ GET_MODE (SUBREG_REG (y)),
+ byte_y,
+ GET_MODE (y)))
+ return 0;
reg_y = subreg_regno_offset (reg_renumber[reg_y],
GET_MODE (SUBREG_REG (y)),
byte_y,
GET_MODE (y));
byte_y = 0;
}
+ else if (!subreg_offset_representable_p (reg_y,
+ GET_MODE (SUBREG_REG (y)),
+ byte_y,
+ GET_MODE (y)))
+ return 0;
}
else
{