summaryrefslogtreecommitdiff
path: root/gcc/reorg.c
diff options
context:
space:
mode:
authorhp <hp@138bc75d-0d04-0410-961f-82ee72b054a4>2009-11-30 07:13:21 +0000
committerhp <hp@138bc75d-0d04-0410-961f-82ee72b054a4>2009-11-30 07:13:21 +0000
commit08dc6a501c685f2e961fae92388bc449ad097e86 (patch)
treec95150123040569bbd8625a0a8b356c4adf056b9 /gcc/reorg.c
parentfcb50449d48208da75e9f7b473341f484816f523 (diff)
downloadgcc-08dc6a501c685f2e961fae92388bc449ad097e86.tar.gz
PR rtl-optimization/40086
* reorg.c (relax_delay_slots): When looking for redundant insn at the branch target, use next_real_insn, not next_active_insn. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@154751 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/reorg.c')
-rw-r--r--gcc/reorg.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/gcc/reorg.c b/gcc/reorg.c
index 4871b0e8c29..b1de4bec60f 100644
--- a/gcc/reorg.c
+++ b/gcc/reorg.c
@@ -3506,8 +3506,11 @@ relax_delay_slots (rtx first)
}
/* If the first insn at TARGET_LABEL is redundant with a previous
- insn, redirect the jump to the following insn process again. */
- trial = next_active_insn (target_label);
+ insn, redirect the jump to the following insn and process again.
+ We use next_real_insn instead of next_active_insn so we
+ don't skip USE-markers, or we'll end up with incorrect
+ liveness info. */
+ trial = next_real_insn (target_label);
if (trial && GET_CODE (PATTERN (trial)) != SEQUENCE
&& redundant_insn (trial, insn, 0)
&& ! can_throw_internal (trial))