Fix transform_to_exit_first_loop_alt with -g
authorTom de Vries <tom@codesourcery.com>
Fri, 6 Nov 2015 13:21:51 +0000 (13:21 +0000)
committerTom de Vries <vries@gcc.gnu.org>
Fri, 6 Nov 2015 13:21:51 +0000 (13:21 +0000)
2015-11-06  Tom de Vries  <tom@codesourcery.com>

* tree-cfg.c (gimple_split_block_before_cond_jump): Split before
cond_jump, instead of split after last nondebug insn before cond_jump.
* tree-parloops.c (transform_to_exit_first_loop_alt): Verify ssa before
returning.

From-SVN: r229847

gcc/ChangeLog
gcc/tree-cfg.c
gcc/tree-parloops.c

index 3966f5158600e01c007d04a02fc7370e97b9a40a..5e4a1c333ef074d97ad8192b98f019901cfdda0e 100644 (file)
@@ -1,3 +1,10 @@
+2015-11-06  Tom de Vries  <tom@codesourcery.com>
+
+       * tree-cfg.c (gimple_split_block_before_cond_jump): Split before
+       cond_jump, instead of split after last nondebug insn before cond_jump.
+       * tree-parloops.c (transform_to_exit_first_loop_alt): Verify ssa before
+       returning.
+
 2015-11-06  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
 
        PR target/68088
index cfed3c2195cfa6a21a3cc90f85dcba93861cd7ab..5d98eec9f18c1200fa3d3a44049be917949f6d55 100644 (file)
@@ -5783,7 +5783,7 @@ gimple_split_block_before_cond_jump (basic_block bb)
   if (gimple_code (last) != GIMPLE_COND
       && gimple_code (last) != GIMPLE_SWITCH)
     return NULL;
-  gsi_prev_nondebug (&gsi);
+  gsi_prev (&gsi);
   split_point = gsi_stmt (gsi);
   return split_block (bb, split_point)->dest;
 }
index 6c856340b96d2d918c0fa24857fce2d17b7add90..3d41275c4d35182ca140a928ffd133274c7dc823 100644 (file)
@@ -1737,6 +1737,8 @@ transform_to_exit_first_loop_alt (struct loop *loop,
   /* Recalculate dominance info.  */
   free_dominance_info (CDI_DOMINATORS);
   calculate_dominance_info (CDI_DOMINATORS);
+
+  checking_verify_ssa (true, true);
 }
 
 /* Tries to moves the exit condition of LOOP to the beginning of its header