From 0948d23fffba754853cc93984e106d2aaf9a3897 Mon Sep 17 00:00:00 2001 From: Eric Botcazou Date: Thu, 15 Jun 2017 13:24:53 +0000 Subject: [PATCH] re PR rtl-optimization/80474 (ipa-cp wrongly adding LO(symbol) twice) PR rtl-optimization/80474 * reorg.c (update_block): Do not ignore instructions in a delay slot. From-SVN: r249219 --- gcc/ChangeLog | 5 +++++ gcc/reorg.c | 11 ++--------- 2 files changed, 7 insertions(+), 9 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index f460df6bd0d..fc9554f0142 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2017-06-15 Eric Botcazou + + PR rtl-optimization/80474 + * reorg.c (update_block): Do not ignore instructions in a delay slot. + 2017-06-15 Segher Boessenkool * config/rs6000/rs6000.md (add3): Use reg_or_subregno instead diff --git a/gcc/reorg.c b/gcc/reorg.c index 1a6fd86e286..dbd74ab2404 100644 --- a/gcc/reorg.c +++ b/gcc/reorg.c @@ -1694,9 +1694,8 @@ own_thread_p (rtx thread, rtx label, int allow_fallthrough) } /* Called when INSN is being moved from a location near the target of a jump. - We leave a marker of the form (use (INSN)) immediately in front - of WHERE for mark_target_live_regs. These markers will be deleted when - reorg finishes. + We leave a marker of the form (use (INSN)) immediately in front of WHERE + for mark_target_live_regs. These markers will be deleted at the end. We used to try to update the live status of registers if WHERE is at the start of a basic block, but that can't work since we may remove a @@ -1705,16 +1704,10 @@ own_thread_p (rtx thread, rtx label, int allow_fallthrough) static void update_block (rtx_insn *insn, rtx_insn *where) { - /* Ignore if this was in a delay slot and it came from the target of - a branch. */ - if (INSN_FROM_TARGET_P (insn)) - return; - emit_insn_before (gen_rtx_USE (VOIDmode, insn), where); /* INSN might be making a value live in a block where it didn't use to be. So recompute liveness information for this block. */ - incr_ticks_for_insn (insn); } -- 2.30.2