diff options
author | Aldy Hernandez <aldyh@redhat.com> | 2019-07-11 07:50:58 +0000 |
---|---|---|
committer | Aldy Hernandez <aldyh@gcc.gnu.org> | 2019-07-11 07:50:58 +0000 |
commit | 435a6d9580fa1675537a4d2a3151802a15064d3d (patch) | |
tree | e01e63c5f4914c367549a907d46d6fcb13d3d481 | |
parent | 3e66e7b0d1efa3f78a5598884e2d5d526894833e (diff) | |
download | gcc-435a6d9580fa1675537a4d2a3151802a15064d3d.zip gcc-435a6d9580fa1675537a4d2a3151802a15064d3d.tar.gz gcc-435a6d9580fa1675537a4d2a3151802a15064d3d.tar.bz2 |
Do not try to further refine a VR_UNDEFINED result when intersecting
value_ranges.
From-SVN: r273377
-rw-r--r-- | gcc/ChangeLog | 6 | ||||
-rw-r--r-- | gcc/tree-vrp.c | 5 |
2 files changed, 11 insertions, 0 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index ee70694..f171853 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +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> PR middle-end/91131 diff --git a/gcc/tree-vrp.c b/gcc/tree-vrp.c index dc7f825..594ee9a 100644 --- a/gcc/tree-vrp.c +++ b/gcc/tree-vrp.c @@ -5977,6 +5977,11 @@ intersect_ranges (enum value_range_kind *vr0type, 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 result for the intersection. That's always a conservative correct estimate unless VR1 is a constant singleton range |