]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
re PR rtl-optimization/47036 (ICE: in move_cond_jump, at sel-sched.c:4901 with -fsche...
authorAlexander Monakov <amonakov@ispras.ru>
Fri, 24 Dec 2010 14:19:23 +0000 (17:19 +0300)
committerAlexander Monakov <amonakov@gcc.gnu.org>
Fri, 24 Dec 2010 14:19:23 +0000 (17:19 +0300)
PR rtl-optimization/47036
* sel-sched-ir.c (fallthru_bb_of_jump): Remove special support for
unconditional jumps.
* sel-sched.c (moveup_expr): Ditto.

testsuite:
* g++.dg/opt/pr47036.C: New.

From-SVN: r168225

gcc/ChangeLog
gcc/sel-sched-ir.c
gcc/sel-sched.c
gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/opt/pr47036.C [new file with mode: 0644]

index 83ad1a9c3826e5d20e3c3ce36e90ae79a4a374da..26762f28d49b30f1ba782a96aa4f52c1e9f2443d 100644 (file)
@@ -1,3 +1,10 @@
+2010-12-24  Alexander Monakov  <amonakov@ispras.ru>
+
+       PR rtl-optimization/47036
+       * sel-sched-ir.c (fallthru_bb_of_jump): Remove special support for
+       unconditional jumps.
+       * sel-sched.c (moveup_expr): Ditto.
+
 2010-12-23  Sebastian Pop  <sebastian.pop@amd.com>
            Richard Guenther  <rguenther@suse.de>
 
index 43619d9dac45fc307cb76ec808301d000c6a9ae8..b88dad1b3f6c992226acbd11f80dc3595bc5b7cf 100644 (file)
@@ -4441,9 +4441,6 @@ fallthru_bb_of_jump (rtx jump)
   if (!JUMP_P (jump))
     return NULL;
 
-  if (any_uncondjump_p (jump))
-    return single_succ (BLOCK_FOR_INSN (jump));
-
   if (!any_condjump_p (jump))
     return NULL;
 
index edd6cb9d3cd3625431e06b25cfe2fbd30f001f1f..791adf1f6a8fce4684d189e14b1576c774ffd7f1 100644 (file)
@@ -2171,10 +2171,8 @@ moveup_expr (expr_t expr, insn_t through_insn, bool inside_insn_group,
               || ! in_current_region_p (fallthru_bb))
             return MOVEUP_EXPR_NULL;
 
-          /* And it should be mutually exclusive with through_insn, or
-             be an unconditional jump.  */
-          if (! any_uncondjump_p (insn)
-              && ! sched_insns_conditions_mutex_p (insn, through_insn)
+          /* And it should be mutually exclusive with through_insn.  */
+          if (! sched_insns_conditions_mutex_p (insn, through_insn)
              && ! DEBUG_INSN_P (through_insn))
             return MOVEUP_EXPR_NULL;
         }
index bd527d7a4a3f50716f49d90cd602d6f1b9ad3a70..2cc045ba7e20c04d49b2aec42d4bf991ee4b5d06 100644 (file)
@@ -1,3 +1,8 @@
+2010-12-24  Alexander Monakov  <amonakov@ispras.ru>
+
+       PR rtl-optimization/47036
+       * g++.dg/opt/pr47036.C: New.
+
 2010-12-24  Thomas Koenig  <tkoenig@gcc.gnu.org>
 
        PR fortran/31821
diff --git a/gcc/testsuite/g++.dg/opt/pr47036.C b/gcc/testsuite/g++.dg/opt/pr47036.C
new file mode 100644 (file)
index 0000000..d6d5adc
--- /dev/null
@@ -0,0 +1,10 @@
+// { dg-do compile { target powerpc*-*-* ia64-*-* x86_64-*-* } }
+// { dg-options "-fschedule-insns -fselective-scheduling -fno-dce" }
+
+
+void foo ()
+{
+  for (;;)
+    for (;;({break;}));
+}
+