]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
Backport a change to the 2.95 branch
authorBernd Schmidt <bernds@redhat.co.uk>
Thu, 30 Nov 2000 12:11:42 +0000 (12:11 +0000)
committerBernd Schmidt <bernds@gcc.gnu.org>
Thu, 30 Nov 2000 12:11:42 +0000 (12:11 +0000)
From-SVN: r37882

gcc/ChangeLog
gcc/reload.c

index f5a03d421317063ce2da764181f1bf9a5f864266..e05c3c2e4b70cc6ec6133779b132ab8f3770ebb5 100644 (file)
@@ -1,5 +1,10 @@
 2000-11-30  Bernd Schmidt  <bernds@redhat.co.uk>
 
+       2000-09-14  Alexandre Oliva  <aoliva@redhat.com>, Bernd Schmidt  <bernds@redhat.co.uk>
+       * 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  <bernds@redhat.co.uk>
        * reload1.c (forget_old_reloads_1): If a hard reg is stored, clear
        its entry in spill_reg_store.
index d8b41363d3633d479d61892e7bccd745d3f0ab6a..b22d6dd08ab19fa3ae443b4221c0ef8fc8f02378 100644 (file)
@@ -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
                {