Commit 68ad1df5 by Richard Biener Committed by Richard Biener

tree-vrp.c (intersect_ranges): If we failed to handle the intersection choose a…

tree-vrp.c (intersect_ranges): If we failed to handle the intersection choose a constant singleton range if...

2016-09-30  Richard Biener  <rguenther@suse.de>

	* tree-vrp.c (intersect_ranges): If we failed to handle
	the intersection choose a constant singleton range if available.

From-SVN: r240647
parent f334c828
2016-09-30 Richard Biener <rguenther@suse.de> 2016-09-30 Richard Biener <rguenther@suse.de>
* tree-vrp.c (intersect_ranges): If we failed to handle
the intersection choose a constant singleton range if available.
2016-09-30 Richard Biener <rguenther@suse.de>
PR tree-optimization/77399 PR tree-optimization/77399
* tree-ssa-forwprop.c (simplify_vector_constructor): Handle * tree-ssa-forwprop.c (simplify_vector_constructor): Handle
float <-> int conversions. float <-> int conversions.
......
...@@ -8555,7 +8555,16 @@ intersect_ranges (enum value_range_type *vr0type, ...@@ -8555,7 +8555,16 @@ intersect_ranges (enum value_range_type *vr0type,
/* As a fallback simply use { *VRTYPE, *VR0MIN, *VR0MAX } as /* As a fallback simply use { *VRTYPE, *VR0MIN, *VR0MAX } as
result for the intersection. That's always a conservative result for the intersection. That's always a conservative
correct estimate. */ correct estimate unless VR1 is a constant singleton range
in which case we choose that. */
if (vr1type == VR_RANGE
&& is_gimple_min_invariant (vr1min)
&& vrp_operand_equal_p (vr1min, vr1max))
{
*vr0type = vr1type;
*vr0min = vr1min;
*vr0max = vr1max;
}
return; return;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment