(find_equiv_reg): Set need_stable_sp if GOAL is the stack pointer.
authorRichard Kenner <kenner@gcc.gnu.org>
Sat, 8 Jun 1996 17:43:59 +0000 (13:43 -0400)
committerRichard Kenner <kenner@gcc.gnu.org>
Sat, 8 Jun 1996 17:43:59 +0000 (13:43 -0400)
From-SVN: r12242

gcc/reload.c

index 7288793..0d35f55 100644 (file)
@@ -5554,7 +5554,7 @@ find_equiv_reg (goal, insn, class, other, reload_reg_p, goalreg, mode)
 
   /* If we propose to get the value from the stack pointer or if GOAL is
      a MEM based on the stack pointer, we need a stable SP.  */
-  if (valueno == STACK_POINTER_REGNUM
+  if (valueno == STACK_POINTER_REGNUM || regno == STACK_POINTER_REGNUM
       || (goal_mem && reg_overlap_mentioned_for_reload_p (stack_pointer_rtx,
                                                          goal)))
     need_stable_sp = 1;