From 87afbee625a00e6f657534f7959a28cec762320c Mon Sep 17 00:00:00 2001 From: Jeff Law Date: Wed, 14 Jul 1999 16:30:24 -0600 Subject: [PATCH] reload.c (find_reloads): Emit a USE for a pseudo register without a hard register if... MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit � * reload.c (find_reloads): Emit a USE for a pseudo register without a hard register if we could not create an optional reload for the pseudo. From-SVN: r28103 --- gcc/reload.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/gcc/reload.c b/gcc/reload.c index 011f899..d8b4136 100644 --- a/gcc/reload.c +++ b/gcc/reload.c @@ -3803,11 +3803,16 @@ find_reloads (insn, replace, ind_levels, live_known, reload_reg_p) (insn_code_number < 0 ? 0 : insn_operand_strict_low[insn_code_number][i]), 1, i, operand_type[i]); - /* If a memory reference remains, yet we can't make an optional + /* If a memory reference remains (either as a MEM or a pseudo that + did not get a hard register), yet we can't make an optional reload, check if this is actually a pseudo register reference; we then need to emit a USE and/or a CLOBBER so that reload inheritance will do the right thing. */ - else if (replace && GET_CODE (operand) == MEM) + else if (replace + && (GET_CODE (operand) == MEM + || (GET_CODE (operand) == REG + && REGNO (operand) >= FIRST_PSEUDO_REGISTER + && reg_renumber [REGNO (operand)] < 0))) { operand = *recog_operand_loc[i]; -- 2.7.4