]> gcc.gnu.org Git - gcc.git/commitdiff
reload1.c (choose_reload_regs): Don't set reload_override_in if EQUIV is clobbered...
authorJ"orn Rennecke <amylaar@cygnus.co.uk>
Tue, 7 Jul 1998 15:08:34 +0000 (15:08 +0000)
committerJoern Rennecke <amylaar@gcc.gnu.org>
Tue, 7 Jul 1998 15:08:34 +0000 (16:08 +0100)
* reload1.c (choose_reload_regs): Don't set reload_override_in
if EQUIV is clobbered in INSN and the reload is done after INSN.

From-SVN: r20999

gcc/ChangeLog
gcc/reload1.c

index 04cd1d8dd65c6313a82203acff4bd480ea862571..226d54c646e0dc3b3fad4c647c9c705f7c40e6dc 100644 (file)
@@ -1,3 +1,8 @@
+Tue Jul  7 23:03:34 1998  J"orn Rennecke <amylaar@cygnus.co.uk>
+
+       * reload1.c (choose_reload_regs): Don't set reload_override_in
+       if EQUIV is clobbered in INSN and the reload is done after INSN.
+
 Tue Jul  7 21:23:36 1998  J"orn Rennecke <amylaar@cygnus.co.uk>
 
        * expr.c (emit_queue): If emitting a SEQUENCE, set QUEUED_INSN
index 456abb04eddf09118f4641a6497a1224a7c8e775..b6c0d8d85090e2576372330eabd3707cd9229508 100644 (file)
@@ -5826,14 +5826,30 @@ choose_reload_regs (insn, avoid_return_reg)
                      break;
                    }
 
-             /* JRV: If the equiv register we have found is
-                explicitly clobbered in the current insn, mark but
-                don't use, as above.  */
+             /* If the equiv register we have found is explicitly clobbered
+                in the current insn, it depends on the reload type if we
+                can use it, use it for reload_override_in, or not at all.
+                In particular, we then can't use EQUIV for a
+                RELOAD_FOR_OUTPUT_ADDRESS reload.  */
 
              if (equiv != 0 && regno_clobbered_p (regno, insn))
                {
-                 reload_override_in[r] = equiv;
-                 equiv = 0;
+                 switch (reload_when_needed[r])
+                   {
+                   case RELOAD_FOR_OTHER_ADDRESS:
+                   case RELOAD_FOR_INPADDR_ADDRESS:
+                   case RELOAD_FOR_INPUT_ADDRESS:
+                   case RELOAD_FOR_OPADDR_ADDR:
+                     break;
+                   case RELOAD_OTHER:
+                   case RELOAD_FOR_INPUT:
+                   case RELOAD_FOR_OPERAND_ADDRESS:
+                     reload_override_in[r] = equiv;
+                     /* Fall through. */
+                   default:
+                     equiv = 0;
+                     break;
+                   }
                }
 
              /* If we found an equivalent reg, say no code need be generated
This page took 0.080373 seconds and 5 git commands to generate.