diff options
author | Aldy Hernandez <aldyh@redhat.com> | 2020-11-10 14:17:52 +0100 |
---|---|---|
committer | Aldy Hernandez <aldyh@redhat.com> | 2020-11-10 19:28:47 +0100 |
commit | 5e41e7f0928de55d189475fc14f7e6c9737cd507 (patch) | |
tree | 99d9e5888fa8090a42d7bca42168014f63dcfc81 /gcc | |
parent | c710051affd51ac630072ac0cd2c232c0bf2c265 (diff) | |
download | gcc-5e41e7f0928de55d189475fc14f7e6c9737cd507.zip gcc-5e41e7f0928de55d189475fc14f7e6c9737cd507.tar.gz gcc-5e41e7f0928de55d189475fc14f7e6c9737cd507.tar.bz2 |
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.
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/value-range.cc | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/gcc/value-range.cc b/gcc/value-range.cc index f83a824..b7ccba0 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 |