reload.c (find_equiv_reg): If need_stable_sp is set, check if stack pointer is change...
authorJ"orn Rennecke <amylaar@cygnus.co.uk>
Tue, 7 Jul 1998 00:18:02 +0000 (00:18 +0000)
committerJeff Law <law@gcc.gnu.org>
Tue, 7 Jul 1998 00:18:02 +0000 (18:18 -0600)
* reload.c (find_equiv_reg): If need_stable_sp is set,
check if stack pointer is changed directly.

From-SVN: r20984

gcc/ChangeLog
gcc/reload.c

index d258618..d175d6d 100644 (file)
@@ -76,6 +76,9 @@ Mon Jul  6 22:50:48 1998  Jason Merrill  <jason@yorick.cygnus.com>
 
 Mon Jul  6 22:47:55 1998  J"orn Rennecke <amylaar@cygnus.co.uk>
 
+       * reload.c (find_equiv_reg): If need_stable_sp is set,
+       check if stack pointer is changed directly.
+
        * reload1.c (delete_dead_insn): Don't delete feeding insn
        if that insn has side effects.
 
index ab04ae3..828be56 100644 (file)
@@ -6220,6 +6220,8 @@ find_equiv_reg (goal, insn, class, other, reload_reg_p, goalreg, mode)
                  if (goal_mem_addr_varies
                      && reg_overlap_mentioned_for_reload_p (dest, goal))
                    return 0;
+                 if (xregno == STACK_POINTER_REGNUM && need_stable_sp)
+                   return 0;
                }
              else if (goal_mem && GET_CODE (dest) == MEM
                       && ! push_operand (dest, GET_MODE (dest)))