[gcc r11-4885] Early exit from irange::set for poly ints.
Aldy Hernandez
aldyh@gcc.gnu.org
Tue Nov 10 18:29:09 GMT 2020
https://gcc.gnu.org/g:5e41e7f0928de55d189475fc14f7e6c9737cd507
commit r11-4885-g5e41e7f0928de55d189475fc14f7e6c9737cd507
Author: Aldy Hernandez <aldyh@redhat.com>
Date: Tue Nov 10 14:17:52 2020 +0100
Early exit from irange::set for poly ints.
My previous cleanups to irange::set moved the early exit when
VARYING. This caused poly int varyings to be created with
incorrect min/max.
We can just set varying and exit for all poly ints.
gcc/ChangeLog:
* value-range.cc (irange::set): Early exit for poly ints.
Diff:
---
gcc/value-range.cc | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/gcc/value-range.cc b/gcc/value-range.cc
index f83a824a982..b7ccba010e4 100644
--- a/gcc/value-range.cc
+++ b/gcc/value-range.cc
@@ -249,9 +249,11 @@ irange::set (tree min, tree max, value_range_kind kind)
return;
}
- if (kind != VR_VARYING
- && (POLY_INT_CST_P (min) || POLY_INT_CST_P (max)))
- kind = VR_VARYING;
+ if (POLY_INT_CST_P (min) || POLY_INT_CST_P (max))
+ {
+ set_varying (TREE_TYPE (min));
+ return;
+ }
// Nothing to canonicalize for symbolic ranges.
if (TREE_CODE (min) != INTEGER_CST
More information about the Gcc-cvs
mailing list