aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorRichard Kenner <kenner@gcc.gnu.org>1993-04-03 17:39:33 -0500
committerRichard Kenner <kenner@gcc.gnu.org>1993-04-03 17:39:33 -0500
commit2c9ce2effc5b3946371d14fe7ae093d6ac1bc112 (patch)
tree32b383fd9ddd1a5ef9e6258e14a5f30c7a87c19b /gcc
parentc03b7665c267cb9a910c05323c8d4c0571711cd0 (diff)
downloadgcc-2c9ce2effc5b3946371d14fe7ae093d6ac1bc112.zip
gcc-2c9ce2effc5b3946371d14fe7ae093d6ac1bc112.tar.gz
gcc-2c9ce2effc5b3946371d14fe7ae093d6ac1bc112.tar.bz2
(emit_reload_insns): Don't update the status of a register from an
input reload if it also has an output reload. From-SVN: r3994
Diffstat (limited to 'gcc')
-rw-r--r--gcc/reload1.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/gcc/reload1.c b/gcc/reload1.c
index e6302c2..bcbd68f 100644
--- a/gcc/reload1.c
+++ b/gcc/reload1.c
@@ -6148,11 +6148,15 @@ emit_reload_insns (insn)
}
}
- /* Maybe the spill reg contains a copy of reload_in. */
+ /* Maybe the spill reg contains a copy of reload_in. Only do
+ something if there will not be an output reload for
+ the register being reloaded. */
else if (reload_out[r] == 0
&& reload_in[r] != 0
- && (GET_CODE (reload_in[r]) == REG
- || GET_CODE (reload_in_reg[r]) == REG))
+ && ((GET_CODE (reload_in[r]) == REG
+ && ! reg_has_output_reload[REGNO (reload_in[r])]
+ || (GET_CODE (reload_in_reg[r]) == REG
+ && ! reg_has_output_reload[REGNO (reload_in_reg[r])]))))
{
register int nregno;
int nnr;