break;
}
if (equal_p)
- /* After the optimization PHI result can have value
- which it couldn't have previously.
- We could instead of resetting it union the range
- info with oarg. */
- reset_flow_sensitive_info (gimple_phi_result (phi));
+ {
+ tree phires = gimple_phi_result (phi);
+ if (SSA_NAME_RANGE_INFO (phires))
+ {
+ /* After the optimization PHI result can have value
+ which it couldn't have previously. */
+ int_range_max r;
+ if (get_global_range_query ()->range_of_expr (r, phires,
+ phi))
+ {
+ int_range<2> tmp (carg, carg);
+ r.union_ (tmp);
+ reset_flow_sensitive_info (phires);
+ set_range_info (phires, r);
+ }
+ else
+ reset_flow_sensitive_info (phires);
+ }
+ }
if (equal_p && MAY_HAVE_DEBUG_BIND_STMTS)
{
imm_use_iterator imm_iter;