reload.c (find_reloads_address_1): Generate reloads for auto_inc pseudos that refer...
authorAlexandre Oliva <aoliva@redhat.com>
Thu, 14 Sep 2000 17:42:48 +0000 (17:42 +0000)
committerAlexandre Oliva <aoliva@gcc.gnu.org>
Thu, 14 Sep 2000 17:42:48 +0000 (17:42 +0000)
* 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.

From-SVN: r36413

gcc/ChangeLog
gcc/reload.c

index 65a39a26221e29cb375d06086dac34e243fc055d..fb8152f34b3185186c52b938dfcf3339603c4bc8 100644 (file)
@@ -1,3 +1,9 @@
+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.
+
 Thu Sep 14 12:10:16 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
 
        * expr.c (expand_expr, case COMPONENT_EXPR): Copy memory attributes
index 1737ac48356be2ed44c001db07fb4ec1f403505f..3fc2bfe98cc3dfb443b6f5a77b78c4ea34ab31ed 100644 (file)
@@ -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
                {