Commit 435a6d95 by Aldy Hernandez Committed by Aldy Hernandez

Do not try to further refine a VR_UNDEFINED result when intersecting

value_ranges.

From-SVN: r273377
parent 3e66e7b0
2019-07-11 Aldy Hernandez <aldyh@redhat.com>
* tree-vrp.c (intersect_ranges): If we know the intersection is
empty, there is no need to conservatively add anything else to
the set.
2019-07-11 Richard Biener <rguenther@suse.de> 2019-07-11 Richard Biener <rguenther@suse.de>
PR middle-end/91131 PR middle-end/91131
......
...@@ -5977,6 +5977,11 @@ intersect_ranges (enum value_range_kind *vr0type, ...@@ -5977,6 +5977,11 @@ intersect_ranges (enum value_range_kind *vr0type,
gcc_unreachable (); gcc_unreachable ();
} }
/* If we know the intersection is empty, there's no need to
conservatively add anything else to the set. */
if (*vr0type == VR_UNDEFINED)
return;
/* 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 unless VR1 is a constant singleton range correct estimate unless VR1 is a constant singleton range
......
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