From 5e6aa5131b827017f9a08f22d68f18931892808c Mon Sep 17 00:00:00 2001 From: Richard Kenner Date: Fri, 6 May 1994 18:55:32 -0400 Subject: [PATCH] (find_reloads): Ignore alternatives that will not be reloadable due to PREFERRED_RELOAD_CLASS. From-SVN: r7257 --- gcc/reload.c | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/gcc/reload.c b/gcc/reload.c index 254867e50f5f..c141964a0f8f 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 -- 2.43.5