diff options
author | aoliva <aoliva@138bc75d-0d04-0410-961f-82ee72b054a4> | 2000-09-14 17:42:48 +0000 |
---|---|---|
committer | aoliva <aoliva@138bc75d-0d04-0410-961f-82ee72b054a4> | 2000-09-14 17:42:48 +0000 |
commit | 2b1e2054e29faf3c81f8731af7f95d692440b0d4 (patch) | |
tree | b0d56ca7b3f344d846191da5b264e612479a155e /gcc/reload.c | |
parent | 3c4deba66ebed8aa1bf723c82b89dda0b13af35e (diff) | |
download | gcc-2b1e2054e29faf3c81f8731af7f95d692440b0d4.tar.gz |
* reload.c (find_reloads_address_1): Generate reloads for auto_inc
pseudos that refer to the original pseudos, not only to their
equivalent memory locations.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@36413 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/reload.c')
-rw-r--r-- | gcc/reload.c | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/gcc/reload.c b/gcc/reload.c index 1737ac48356..3fc2bfe98cc 100644 --- a/gcc/reload.c +++ b/gcc/reload.c @@ -5276,21 +5276,18 @@ find_reloads_address_1 (mode, x, context, loc, opnum, type, ind_levels, insn) && ((*insn_data[icode].operand[1].predicate) (equiv, Pmode)))) { - loc = &XEXP (x, 0); + /* We use the original pseudo for loc, so that + emit_reload_insns() knows which pseudo this + reload refers to and updates the pseudo rtx, not + its equivalent memory location, as well as the + corresponding entry in reg_last_reload_reg. */ + loc = &XEXP (x_orig, 0); x = XEXP (x, 0); reloadnum = push_reload (x, x, loc, loc, (context ? INDEX_REG_CLASS : BASE_REG_CLASS), GET_MODE (x), GET_MODE (x), 0, 0, opnum, RELOAD_OTHER); - - /* If we created a new MEM based on reg_equiv_mem[REGNO], then - LOC above is part of the new MEM, not the MEM in INSN. - - We must also replace the address of the MEM in INSN. */ - if (&XEXP (x_orig, 0) != loc) - push_replacement (&XEXP (x_orig, 0), reloadnum, VOIDmode); - } else { |