]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
gcc/
authorabel <abel@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 3 Feb 2014 12:00:23 +0000 (12:00 +0000)
committerabel <abel@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 3 Feb 2014 12:00:23 +0000 (12:00 +0000)
PR rtl-optimization/57662
* sel-sched.c (code_motion_path_driver): Do not mark already not
existing blocks in the visiting bitmap.

testsuite/
PR rtl-optimization/57662
* g++.dg/pr57662.C: New test.

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

gcc/ChangeLog
gcc/sel-sched.c
gcc/testsuite/ChangeLog

index 13333db1426a0797051fbde217b861414e736e20..5be3db527717fcdb59beebe79f0281f3016b1256 100644 (file)
@@ -1,3 +1,9 @@
+2014-02-03  Andrey Belevantsev  <abel@ispras.ru>
+
+       PR rtl-optimization/57662
+       * sel-sched.c (code_motion_path_driver): Do not mark already not
+       existing blocks in the visiting bitmap.
+
 2014-02-03  Andrey Belevantsev  <abel@ispras.ru>
 
        * sel-sched-ir.c (sel_gen_insn_from_expr_after): Reset INSN_DELETED_P
index ad4a0aa50206a06b8a45905fdccfd9ef4f9d88f8..d3d73b2b188b5f397ef1070dcd60b3d7f4aac413 100644 (file)
@@ -6741,7 +6741,11 @@ code_motion_path_driver (insn_t insn, av_set_t orig_ops, ilist_t path,
      the numbering by creating bookkeeping blocks.  */
   if (removed_last_insn)
     insn = PREV_INSN (insn);
-  bitmap_set_bit (code_motion_visited_blocks, BLOCK_FOR_INSN (insn)->index);
+
+  /* If we have simplified the control flow and removed the first jump insn,
+     there's no point in marking this block in the visited blocks bitmap.  */
+  if (BLOCK_FOR_INSN (insn))
+    bitmap_set_bit (code_motion_visited_blocks, BLOCK_FOR_INSN (insn)->index);
   return true;
 }
 
index 4d1f3568fef511c520af45a61ccd679c94a11507..4f718dd25dbe229a2bbc28ea81a38cbb0e7da5d0 100644 (file)
@@ -1,3 +1,8 @@
+2014-02-03  Andrey Belevantsev  <abel@ispras.ru>
+
+       PR rtl-optimization/57662
+       * g++.dg/pr57662.C: New test.
+
 2014-02-02  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
 
        * gcc.dg/vmx/3b-15.c: Remove special handling for little endian.