summaryrefslogtreecommitdiff
path: root/gcc/regrename.c
diff options
context:
space:
mode:
authorRichard Henderson <rth@redhat.com>2002-01-10 00:39:39 -0800
committerRichard Henderson <rth@gcc.gnu.org>2002-01-10 00:39:39 -0800
commitc4abb293ead1a1cfb6a047d25f1d35febafabf91 (patch)
treec2452974a6183fbc2e1655f79a7b6f8fa2cf8cb9 /gcc/regrename.c
parentb99d0b106230aca0c705475efbef03f23e2e6cc5 (diff)
downloadgcc-c4abb293ead1a1cfb6a047d25f1d35febafabf91.tar.gz
regrename.c (find_oldest_value_reg): Fix typo in mode change check.
* regrename.c (find_oldest_value_reg): Fix typo in mode change check. (copyprop_hardreg_forward_1): Likewise. Use mode_change_ok. From-SVN: r48715
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))