aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard Kenner <kenner@gcc.gnu.org>1995-10-19 18:44:41 -0400
committerRichard Kenner <kenner@gcc.gnu.org>1995-10-19 18:44:41 -0400
commit932d1119f5bed0210b5f67355e60959f253dd46b (patch)
tree872c26833b33b0e37d4c2aa5d4e512c448aaee18
parent5918c8534aead231920714bacbef7fd458bc353c (diff)
downloadgcc-932d1119f5bed0210b5f67355e60959f253dd46b.zip
gcc-932d1119f5bed0210b5f67355e60959f253dd46b.tar.gz
gcc-932d1119f5bed0210b5f67355e60959f253dd46b.tar.bz2
(distribute_notes): When search for new place to put REG_DEAD note,
call distribute_links if this new place is between i2 and i3, and i2 uses the register. From-SVN: r10475
-rw-r--r--gcc/combine.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/gcc/combine.c b/gcc/combine.c
index 8e46de0..cd7dc12 100644
--- a/gcc/combine.c
+++ b/gcc/combine.c
@@ -10779,6 +10779,21 @@ distribute_notes (notes, from_insn, i3, i2, elim_i2, elim_i1)
&& find_reg_fusage (tem, USE, XEXP (note, 0))))
{
place = tem;
+
+ /* If we are doing a 3->2 combination, and we have a
+ register which formerly died in i3 and was not used
+ by i2, which now no longer dies in i3 and is used in
+ i2 but does not die in i2, and place is between i2
+ and i3, then we may need to move a link from place to
+ i2. */
+ if (i2 && INSN_CUID (place) > INSN_CUID (i2)
+ && from_insn && INSN_CUID (from_insn) > INSN_CUID (i2)
+ && reg_referenced_p (XEXP (note, 0), PATTERN (i2)))
+ {
+ rtx links = LOG_LINKS (place);
+ LOG_LINKS (place) = 0;
+ distribute_links (links);
+ }
break;
}
}