]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
(find_reloads): Ignore alternatives that will not be reloadable due to
authorRichard Kenner <kenner@gcc.gnu.org>
Fri, 6 May 1994 22:55:32 +0000 (18:55 -0400)
committerRichard Kenner <kenner@gcc.gnu.org>
Fri, 6 May 1994 22:55:32 +0000 (18:55 -0400)
PREFERRED_RELOAD_CLASS.

From-SVN: r7257

gcc/reload.c

index 254867e50f5f3dae4af0f33c2bf765c1b0a93b6d..c141964a0f8fd5c5ac1b4424c214646abc7d60a5 100644 (file)
@@ -2953,6 +2953,17 @@ find_reloads (insn, replace, ind_levels, live_known, reload_reg_p)
                  && operand_mode[i] != VOIDmode)
                losers++;
 
+             /* If we can't reload this value at all, reject this
+                alternative.  Note that we could also lose due to
+                LIMIT_RELOAD_RELOAD_CLASS, but we don't check that
+                here.  */
+
+             if (! CONSTANT_P (operand)
+                 && (PREFERRED_RELOAD_CLASS (operand,
+                                             (enum reg_class) this_alternative[i])
+                     == NO_REGS))
+               bad = 1;
+
              /* We prefer to reload pseudos over reloading other things,
                 since such reloads may be able to be eliminated later.
                 If we are reloading a SCRATCH, we won't be generating any