]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
re PR rtl-optimization/49007 (ICE in extract_true_false_edges_from_block at tree...
authorJohn David Anglin <dave.anglin@nrc-cnrc.gc.ca>
Mon, 23 May 2011 22:31:55 +0000 (22:31 +0000)
committerJohn David Anglin <danglin@gcc.gnu.org>
Mon, 23 May 2011 22:31:55 +0000 (22:31 +0000)
PR rtl-optimization/49007
Backport from mainline:
2009-11-30  Hans-Peter Nilsson  <hp@axis.com>

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: r174090

gcc/ChangeLog
gcc/reorg.c

index e682781eb6968a6740557340b71cd2d99dd46ab8..aa62865d75d3ebffa534ab44e39f1d675f1df288 100644 (file)
@@ -1,3 +1,13 @@
+2011-05-23  John David Anglin  <dave.anglin@nrc-cnrc.gc.ca>
+
+       PR rtl-optimization/49007
+       Backport from mainline:
+       2009-11-30  Hans-Peter Nilsson  <hp@axis.com>
+
+       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-21  Eric Botcazou  <ebotcazou@adacore.com>
 
        * config/sparc/sparc.md (setjmp): Handle PIC mode and use the hard
index adab945f7682c7ec426fc5d121d64fb3c821a6fa..2f2b0bac8d643bc09db4bc7b0d2ad9a8fb1f1f53 100644 (file)
@@ -3499,8 +3499,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))