aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorRichard Kenner <kenner@gcc.gnu.org>1994-12-16 06:44:16 -0500
committerRichard Kenner <kenner@gcc.gnu.org>1994-12-16 06:44:16 -0500
commite2cce0cf908143d436dbcc16ce5f81a49845e893 (patch)
tree4fc1a724309cbf32aa5292c6201c5e169fd1710d /gcc
parent6060a79633cdde2801b51dbef337d0ce675b9950 (diff)
downloadgcc-e2cce0cf908143d436dbcc16ce5f81a49845e893.zip
gcc-e2cce0cf908143d436dbcc16ce5f81a49845e893.tar.gz
gcc-e2cce0cf908143d436dbcc16ce5f81a49845e893.tar.bz2
(distribute_notes): When output an insn to hold a REG_DEAD note,
update basic_block_head if necessary. From-SVN: r8658
Diffstat (limited to 'gcc')
-rw-r--r--gcc/combine.c13
1 files changed, 10 insertions, 3 deletions
diff --git a/gcc/combine.c b/gcc/combine.c
index f7415ae..fb82ea8 100644
--- a/gcc/combine.c
+++ b/gcc/combine.c
@@ -10576,9 +10576,16 @@ distribute_notes (notes, from_insn, i3, i2, elim_i2, elim_i1)
put the death node there. This prevents problems with
call-state tracking in caller-save.c. */
if (REG_NOTE_KIND (note) == REG_DEAD && place == 0 && tem != 0)
- place
- = emit_insn_after (gen_rtx (USE, VOIDmode, XEXP (note, 0)),
- tem);
+ {
+ place
+ = emit_insn_after (gen_rtx (USE, VOIDmode, XEXP (note, 0)),
+ tem);
+
+ /* If this insn was emitted between blocks, then update
+ basic_block_head of the current block to include it. */
+ if (basic_block_end[this_basic_block - 1] == tem)
+ basic_block_head[this_basic_block] = place;
+ }
}
/* If the register is set or already dead at PLACE, we needn't do