aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-ssa-ifcombine.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/tree-ssa-ifcombine.c')
-rw-r--r--gcc/tree-ssa-ifcombine.c17
1 files changed, 16 insertions, 1 deletions
diff --git a/gcc/tree-ssa-ifcombine.c b/gcc/tree-ssa-ifcombine.c
index e199689..ef3d16d 100644
--- a/gcc/tree-ssa-ifcombine.c
+++ b/gcc/tree-ssa-ifcombine.c
@@ -765,7 +765,22 @@ pass_tree_ifcombine::execute (function *fun)
if (stmt
&& gimple_code (stmt) == GIMPLE_COND)
- cfg_changed |= tree_ssa_ifcombine_bb (bb);
+ if (tree_ssa_ifcombine_bb (bb))
+ {
+ /* Clear range info from all stmts in BB which is now executed
+ conditional on a always true/false condition. */
+ for (gimple_stmt_iterator gsi = gsi_start_bb (bb);
+ !gsi_end_p (gsi); gsi_next (&gsi))
+ {
+ gimple stmt = gsi_stmt (gsi);
+ ssa_op_iter i;
+ tree op;
+ FOR_EACH_SSA_TREE_OPERAND (op, stmt, i, SSA_OP_DEF)
+ reset_flow_sensitive_info (op);
+ }
+
+ cfg_changed |= true;
+ }
}
free (bbs);