aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard Kenner <kenner@gcc.gnu.org>1992-05-01 06:32:59 -0400
committerRichard Kenner <kenner@gcc.gnu.org>1992-05-01 06:32:59 -0400
commit28f6d3af8c674b712dc5fc61972251209c4a47ee (patch)
treeebae6f1e4d843dee5918ca3ee124336e76c70fe4
parent95ca4f96774ac127b28da0f31e8b04a8df1d6e3a (diff)
downloadgcc-28f6d3af8c674b712dc5fc61972251209c4a47ee.zip
gcc-28f6d3af8c674b712dc5fc61972251209c4a47ee.tar.gz
gcc-28f6d3af8c674b712dc5fc61972251209c4a47ee.tar.bz2
*** empty log message ***
From-SVN: r864
-rw-r--r--gcc/combine.c31
1 files changed, 25 insertions, 6 deletions
diff --git a/gcc/combine.c b/gcc/combine.c
index ade79cb..8db1fb9 100644
--- a/gcc/combine.c
+++ b/gcc/combine.c
@@ -8054,14 +8054,33 @@ distribute_notes (notes, from_insn, i3, i2, elim_i2, elim_i1)
if (! refers_to_regno_p (i, i + 1, PATTERN (place), 0))
{
rtx piece = gen_rtx (REG, word_mode, i);
- rtx use_insn
- = emit_insn_before (gen_rtx (USE, VOIDmode, piece),
- place);
+ rtx p;
+
+ /* See if we already placed a USE note for this
+ register in front of PLACE. */
+ for (p = place;
+ GET_CODE (PREV_INSN (p)) == INSN
+ && GET_CODE (PATTERN (PREV_INSN (p))) == USE;
+ p = PREV_INSN (p))
+ if (rtx_equal_p (piece,
+ XEXP (PATTERN (PREV_INSN (p)), 0)))
+ {
+ p = 0;
+ break;
+ }
+
+ if (p)
+ {
+ rtx use_insn
+ = emit_insn_before (gen_rtx (USE, VOIDmode,
+ piece),
+ p);
+ REG_NOTES (use_insn)
+ = gen_rtx (EXPR_LIST, REG_DEAD, piece,
+ REG_NOTES (use_insn));
+ }
all_used = 0;
- REG_NOTES (use_insn)
- = gen_rtx (EXPR_LIST, REG_DEAD, piece,
- REG_NOTES (use_insn));
}
if (! all_used)