diff options
Diffstat (limited to 'gcc/tree-if-conv.c')
-rw-r--r-- | gcc/tree-if-conv.c | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/gcc/tree-if-conv.c b/gcc/tree-if-conv.c index 8d24c18..dd11d80 100644 --- a/gcc/tree-if-conv.c +++ b/gcc/tree-if-conv.c @@ -2917,9 +2917,12 @@ ifcvt_local_dce (class loop *loop) for (gsi = gsi_start_bb (bb); !gsi_end_p (gsi); gsi_next (&gsi)) { stmt = gsi_stmt (gsi); - if (gimple_store_p (stmt) - || gimple_assign_load_p (stmt) - || is_gimple_debug (stmt)) + if (is_gimple_debug (stmt)) + { + gimple_set_plf (stmt, GF_PLF_2, true); + continue; + } + if (gimple_store_p (stmt) || gimple_assign_load_p (stmt)) { gimple_set_plf (stmt, GF_PLF_2, true); worklist.safe_push (stmt); @@ -2940,7 +2943,7 @@ ifcvt_local_dce (class loop *loop) FOR_EACH_IMM_USE_FAST (use_p, imm_iter, lhs) { stmt1 = USE_STMT (use_p); - if (gimple_bb (stmt1) != bb) + if (!is_gimple_debug (stmt1) && gimple_bb (stmt1) != bb) { gimple_set_plf (stmt, GF_PLF_2, true); worklist.safe_push (stmt); @@ -2963,8 +2966,7 @@ ifcvt_local_dce (class loop *loop) if (TREE_CODE (use) != SSA_NAME) continue; stmt1 = SSA_NAME_DEF_STMT (use); - if (gimple_bb (stmt1) != bb - || gimple_plf (stmt1, GF_PLF_2)) + if (gimple_bb (stmt1) != bb || gimple_plf (stmt1, GF_PLF_2)) continue; gimple_set_plf (stmt1, GF_PLF_2, true); worklist.safe_push (stmt1); |