OSDN Git Service

Daily bump.
[pf3gnuchains/gcc-fork.git] / gcc / tree-ssa-phiopt.c
index 97847f4..3accbbc 100644 (file)
@@ -384,7 +384,12 @@ bool
 empty_block_p (basic_block bb)
 {
   /* BB must have no executable statements.  */
-  return gsi_end_p (gsi_after_labels (bb));
+  gimple_stmt_iterator gsi = gsi_after_labels (bb);
+  if (gsi_end_p (gsi))
+    return true;
+  if (is_gimple_debug (gsi_stmt (gsi)))
+    gsi_next_nondebug (&gsi);
+  return gsi_end_p (gsi);
 }
 
 /* Replace PHI node element whose edge is E in block BB with variable NEW.
@@ -852,7 +857,7 @@ minmax_replacement (basic_block cond_bb, basic_block middle_bb,
 
       /* Move the statement from the middle block.  */
       gsi = gsi_last_bb (cond_bb);
-      gsi_from = gsi_last_bb (middle_bb);
+      gsi_from = gsi_last_nondebug_bb (middle_bb);
       gsi_move_before (&gsi_from, &gsi);
     }