aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorJeff Law <law@gcc.gnu.org>1999-07-14 16:30:24 -0600
committerJeff Law <law@gcc.gnu.org>1999-07-14 16:30:24 -0600
commit87afbee625a00e6f657534f7959a28cec762320c (patch)
tree88ffb81405bba08f3effade2c45b96d557a98c1c /gcc
parentbb183b9e6bd24141a9754677a782d341b52d00e3 (diff)
downloadgcc-87afbee625a00e6f657534f7959a28cec762320c.zip
gcc-87afbee625a00e6f657534f7959a28cec762320c.tar.gz
gcc-87afbee625a00e6f657534f7959a28cec762320c.tar.bz2
reload.c (find_reloads): Emit a USE for a pseudo register without a hard register if...
� * 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
Diffstat (limited to 'gcc')
-rw-r--r--gcc/reload.c9
1 files 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];