From: Aldy Hernandez Date: Tue, 10 Nov 2020 13:17:52 +0000 (+0100) Subject: Early exit from irange::set for poly ints. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=5e41e7f0928de55d189475fc14f7e6c9737cd507;p=gcc.git 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 --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