From: Bernd Schmidt Date: Thu, 30 Nov 2000 12:11:42 +0000 (+0000) Subject: Backport a change to the 2.95 branch X-Git-Tag: prereleases/gcc-2.95.3-test1~51 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=db5bd59778d72788ccb6c5a0bb8232ef415e8fef;p=thirdparty%2Fgcc.git Backport a change to the 2.95 branch From-SVN: r37882 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index f5a03d421317..e05c3c2e4b70 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,5 +1,10 @@ 2000-11-30 Bernd Schmidt + 2000-09-14 Alexandre Oliva , Bernd Schmidt + * 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. + 2000-09-18 Bernd Schmidt * reload1.c (forget_old_reloads_1): If a hard reg is stored, clear its entry in spill_reg_store. diff --git a/gcc/reload.c b/gcc/reload.c index d8b41363d363..b22d6dd08ab1 100644 --- a/gcc/reload.c +++ b/gcc/reload.c @@ -5346,7 +5346,12 @@ find_reloads_address_1 (mode, x, context, loc, opnum, type, ind_levels, insn) && (*insn_operand_predicate[icode][0]) (equiv, Pmode) && (*insn_operand_predicate[icode][1]) (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, @@ -5354,13 +5359,6 @@ find_reloads_address_1 (mode, x, context, loc, opnum, type, ind_levels, insn) 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 {