summaryrefslogtreecommitdiff
path: root/gcc/regrename.c
diff options
context:
space:
mode:
authorrth <rth@138bc75d-0d04-0410-961f-82ee72b054a4>2002-01-10 08:39:39 +0000
committerrth <rth@138bc75d-0d04-0410-961f-82ee72b054a4>2002-01-10 08:39:39 +0000
commitf3ae2bae11d63affeec035d8aa158cc948ee7803 (patch)
treec2452974a6183fbc2e1655f79a7b6f8fa2cf8cb9 /gcc/regrename.c
parentb5921115109d62a8b363035ecb6cafe36f6829b6 (diff)
downloadgcc-f3ae2bae11d63affeec035d8aa158cc948ee7803.tar.gz
* regrename.c (find_oldest_value_reg): Fix typo in mode change check.
(copyprop_hardreg_forward_1): Likewise. Use mode_change_ok. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@48715 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/regrename.c')
-rw-r--r--gcc/regrename.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/gcc/regrename.c b/gcc/regrename.c
index 149fb247681..09856f828d5 100644
--- a/gcc/regrename.c
+++ b/gcc/regrename.c
@@ -1313,7 +1313,7 @@ find_oldest_value_reg (class, reg, vd)
for (i = vd->e[regno].oldest_regno; i != regno; i = vd->e[i].next_regno)
if (TEST_HARD_REG_BIT (reg_class_contents[class], i)
&& (vd->e[i].mode == mode
- || mode_change_ok (vd->e[i].mode, mode, regno)))
+ || mode_change_ok (vd->e[i].mode, mode, i)))
{
rtx new = gen_rtx_raw_REG (mode, i);
ORIGINAL_REGNO (new) = ORIGINAL_REGNO (reg);
@@ -1600,7 +1600,8 @@ copyprop_hardreg_forward_1 (bb, vd)
/* Otherwise, try all valid registers and see if its valid. */
for (i = vd->e[regno].oldest_regno; i != regno;
i = vd->e[i].next_regno)
- if (mode == vd->e[regno].mode)
+ if (vd->e[i].mode == mode
+ || mode_change_ok (vd->e[i].mode, mode, i))
{
new = gen_rtx_raw_REG (mode, i);
if (validate_change (insn, &SET_SRC (set), new, 0))