From: John David Anglin Date: Tue, 24 May 2011 18:44:35 +0000 (+0000) Subject: re PR rtl-optimization/49007 (ICE in extract_true_false_edges_from_block at tree... X-Git-Tag: releases/gcc-4.3.6~77 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0f9a224dad27817bf3dd8f4419228a79ab856207;p=thirdparty%2Fgcc.git re PR rtl-optimization/49007 (ICE in extract_true_false_edges_from_block at tree-cfg.c:7379) PR rtl-optimization/49007 Backport from mainline: 2009-11-30 Hans-Peter Nilsson 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. From-SVN: r174132 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 207c49423580..ea6fc584f918 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,13 @@ +2011-05-24 John David Anglin + + PR rtl-optimization/49007 + Backport from mainline: + 2009-11-30 Hans-Peter Nilsson + + 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. + 2011-05-14 John David Anglin PR rtl-optimization/48932 diff --git a/gcc/reorg.c b/gcc/reorg.c index 05374cb3ff9b..f32b179d2ffe 100644 --- a/gcc/reorg.c +++ b/gcc/reorg.c @@ -3502,8 +3502,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))