diff options
author | Richard Kenner <kenner@gcc.gnu.org> | 1994-11-30 18:04:48 -0500 |
---|---|---|
committer | Richard Kenner <kenner@gcc.gnu.org> | 1994-11-30 18:04:48 -0500 |
commit | 8922eb5b249f40a3f6835570eebba2126aa32aa2 (patch) | |
tree | 243faf3cb04910a184eb799e05cd0096c9dce281 /gcc/reload.c | |
parent | a07805c01cf1ffe6a5b038d0ca5af3d1bb8f385d (diff) | |
download | gcc-8922eb5b249f40a3f6835570eebba2126aa32aa2.zip gcc-8922eb5b249f40a3f6835570eebba2126aa32aa2.tar.gz gcc-8922eb5b249f40a3f6835570eebba2126aa32aa2.tar.bz2 |
(combine_reloads): If using reg dying in this insn as reload reg,
ensure it can't be a secondary output reload reg.
From-SVN: r8584
Diffstat (limited to 'gcc/reload.c')
-rw-r--r-- | gcc/reload.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/gcc/reload.c b/gcc/reload.c index 06d7746..ce50191 100644 --- a/gcc/reload.c +++ b/gcc/reload.c @@ -1382,6 +1382,7 @@ combine_reloads () { int i; int output_reload = -1; + int secondary_out = -1; rtx note; /* Find the output reload; return unless there is exactly one @@ -1525,6 +1526,16 @@ combine_reloads () REGNO (XEXP (note, 0))) && (HARD_REGNO_NREGS (REGNO (XEXP (note, 0)), reload_outmode[output_reload]) <= HARD_REGNO_NREGS (REGNO (XEXP (note, 0)), GET_MODE (XEXP (note, 0)))) + /* Ensure that a secondary or tertiary reload for this output + won't want this register. */ + && ((secondary_out = reload_secondary_out_reload[output_reload]) == -1 + || (! (TEST_HARD_REG_BIT + (reg_class_contents[(int) reload_reg_class[secondary_out]], + REGNO (XEXP (note, 0)))) + && ((secondary_out = reload_secondary_out_reload[secondary_out]) == -1 + || ! (TEST_HARD_REG_BIT + (reg_class_contents[(int) reload_reg_class[secondary_out]], + REGNO (XEXP (note, 0))))))) && ! fixed_regs[REGNO (XEXP (note, 0))]) { reload_reg_rtx[output_reload] = gen_rtx (REG, |