OSDN Git Service

PR rtl-optimization/47036
authoramonakov <amonakov@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 24 Dec 2010 14:19:23 +0000 (14:19 +0000)
committeramonakov <amonakov@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 24 Dec 2010 14:19:23 +0000 (14:19 +0000)
* 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.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@168225 138bc75d-0d04-0410-961f-82ee72b054a4

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 83ad1a9..26762f2 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 43619d9..b88dad1 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 edd6cb9..791adf1 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 bd527d7..2cc045b 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;}));
+}
+