From 3520cdec817a18b86eaaa019b6d98d8261487372 Mon Sep 17 00:00:00 2001 From: Jeffrey A Law Date: Fri, 12 Feb 1999 00:49:04 +0000 Subject: reload.c (find_reloads_address_1): Fix handling of an autoincremented pseudo which is homed in the stack. * reload.c (find_reloads_address_1): Fix handling of an autoincremented pseudo which is homed in the stack. From-SVN: r25162 --- gcc/reload.c | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'gcc/reload.c') diff --git a/gcc/reload.c b/gcc/reload.c index aa16d10..9959942 100644 --- a/gcc/reload.c +++ b/gcc/reload.c @@ -5334,6 +5334,14 @@ find_reloads_address_1 (mode, x, context, loc, opnum, type, ind_levels, insn) (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 { -- cgit v1.1