diff options
author | Vladimir Makarov <vmakarov@redhat.com> | 2012-11-29 19:00:38 +0000 |
---|---|---|
committer | Vladimir Makarov <vmakarov@gcc.gnu.org> | 2012-11-29 19:00:38 +0000 |
commit | f681cf9564b61c663e0c313eec30d5748899e4cd (patch) | |
tree | 09b1d973942771fe75b8e6a6e269af1b84644dd2 /gcc/lra-constraints.c | |
parent | e97cae968277a19dda737090e48d85eef270112e (diff) | |
download | gcc-f681cf9564b61c663e0c313eec30d5748899e4cd.zip gcc-f681cf9564b61c663e0c313eec30d5748899e4cd.tar.gz gcc-f681cf9564b61c663e0c313eec30d5748899e4cd.tar.bz2 |
re PR middle-end/55456 (454.calculix in SPEC CPU 2006 is miscompiled)
2012-11-29 Vladimir Makarov <vmakarov@redhat.com>
PR middle-end/55456
* lra-int.h (lra_new_regno_start): New external.
* lra.c (lra_new_regno_start): New global.
(lra): Set up lra_new_regno_start.
* lra-constraints.c (match_reload): Sync values only for original
pseudos.
From-SVN: r193948
Diffstat (limited to 'gcc/lra-constraints.c')
-rw-r--r-- | gcc/lra-constraints.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/gcc/lra-constraints.c b/gcc/lra-constraints.c index 128401f..f6d5ac3 100644 --- a/gcc/lra-constraints.c +++ b/gcc/lra-constraints.c @@ -685,8 +685,10 @@ match_reload (signed char out, signed char *ins, enum reg_class goal_class, else new_out_reg = gen_rtx_SUBREG (outmode, reg, 0); /* If the input reg is dying here, we can use the same hard - register for REG and IN_RTX. */ - if (REG_P (in_rtx) + register for REG and IN_RTX. We do it only for original + pseudos as reload pseudos can die although original + pseudos still live where reload pseudos dies. */ + if (REG_P (in_rtx) && (int) REGNO (in_rtx) < lra_new_regno_start && find_regno_note (curr_insn, REG_DEAD, REGNO (in_rtx))) lra_reg_info[REGNO (reg)].val = lra_reg_info[REGNO (in_rtx)].val; } @@ -712,7 +714,9 @@ match_reload (signed char out, signed char *ins, enum reg_class goal_class, /* If SUBREG_REG is dying here and sub-registers IN_RTX and NEW_IN_REG are similar, we can use the same hard register for REG and SUBREG_REG. */ - if (REG_P (subreg_reg) && GET_MODE (subreg_reg) == outmode + if (REG_P (subreg_reg) + && (int) REGNO (subreg_reg) < lra_new_regno_start + && GET_MODE (subreg_reg) == outmode && SUBREG_BYTE (in_rtx) == SUBREG_BYTE (new_in_reg) && find_regno_note (curr_insn, REG_DEAD, REGNO (subreg_reg))) lra_reg_info[REGNO (reg)].val |