aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorAaron Sawdey <acsawdey@linux.ibm.com>2019-02-15 15:41:25 +0000
committerAaron Sawdey <acsawdey@gcc.gnu.org>2019-02-15 09:41:25 -0600
commit0a3d52ddee038a5b11eda5697f12d28019d83041 (patch)
treedd835a03357adc87fcc129a78ee36a452d2bb38b /gcc
parenta72128258b86afd0a6a2ddeecea213a74b1e580e (diff)
downloadgcc-0a3d52ddee038a5b11eda5697f12d28019d83041.zip
gcc-0a3d52ddee038a5b11eda5697f12d28019d83041.tar.gz
gcc-0a3d52ddee038a5b11eda5697f12d28019d83041.tar.bz2
re PR rtl-optimization/88308 (ICE in maybe_record_trace_start, at dwarf2cfi.c:2309)
2019-02-15 Aaron Sawdey <acsawdey@linux.ibm.com> PR rtl-optimization/88308 * shrink-wrap.c (move_insn_for_shrink_wrap): Fix LABEL_NUSES counts on copied instruction. From-SVN: r268942
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog6
-rw-r--r--gcc/shrink-wrap.c7
2 files changed, 12 insertions, 1 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 9d13011..7d728c0 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,9 @@
+2019-02-15 Aaron Sawdey <acsawdey@linux.ibm.com>
+
+ PR rtl-optimization/88308
+ * shrink-wrap.c (move_insn_for_shrink_wrap): Fix LABEL_NUSES counts
+ on copied instruction.
+
2019-02-15 Eric Botcazou <ebotcazou@adacore.com>
* final.c (insn_current_reference_address): Replace test on JUMP_P
diff --git a/gcc/shrink-wrap.c b/gcc/shrink-wrap.c
index e0f55ee..57124db 100644
--- a/gcc/shrink-wrap.c
+++ b/gcc/shrink-wrap.c
@@ -414,7 +414,12 @@ move_insn_for_shrink_wrap (basic_block bb, rtx_insn *insn,
dead_debug_insert_temp (debug, DF_REF_REGNO (def), insn,
DEBUG_TEMP_BEFORE_WITH_VALUE);
- emit_insn_after (PATTERN (insn), bb_note (bb));
+ rtx_insn *insn_copy = emit_insn_after (PATTERN (insn), bb_note (bb));
+ /* Update the LABEL_NUSES count on any referenced labels. The ideal
+ solution here would be to actually move the instruction instead
+ of copying/deleting it as this loses some notations on the
+ insn. */
+ mark_jump_label (PATTERN (insn), insn_copy, 0);
delete_insn (insn);
return true;
}