aboutsummaryrefslogtreecommitdiff
path: root/gcc/reload.c
diff options
context:
space:
mode:
authorRichard Kenner <kenner@gcc.gnu.org>1994-05-06 18:55:32 -0400
committerRichard Kenner <kenner@gcc.gnu.org>1994-05-06 18:55:32 -0400
commit5e6aa5131b827017f9a08f22d68f18931892808c (patch)
tree027412b843ee1d29056a85154557b1612e2c536b /gcc/reload.c
parenta2cd7b455464e927c5bb7e0391d7fe9ed4d2f42d (diff)
downloadgcc-5e6aa5131b827017f9a08f22d68f18931892808c.zip
gcc-5e6aa5131b827017f9a08f22d68f18931892808c.tar.gz
gcc-5e6aa5131b827017f9a08f22d68f18931892808c.tar.bz2
(find_reloads): Ignore alternatives that will not be reloadable due to
PREFERRED_RELOAD_CLASS. From-SVN: r7257
Diffstat (limited to 'gcc/reload.c')
-rw-r--r--gcc/reload.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/gcc/reload.c b/gcc/reload.c
index 254867e..c141964 100644
--- a/gcc/reload.c
+++ b/gcc/reload.c
@@ -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