diff options
Diffstat (limited to 'gcc/value-range.cc')
-rw-r--r-- | gcc/value-range.cc | 30 |
1 files changed, 5 insertions, 25 deletions
diff --git a/gcc/value-range.cc b/gcc/value-range.cc index 0e633c1..5827e81 100644 --- a/gcc/value-range.cc +++ b/gcc/value-range.cc @@ -248,31 +248,11 @@ irange::set (tree min, tree max, value_range_kind kind) set_undefined (); return; } - if (kind == VR_RANGE) - { - /* Convert POLY_INT_CST bounds into worst-case INTEGER_CST bounds. */ - if (POLY_INT_CST_P (min)) - { - tree type_min = vrp_val_min (TREE_TYPE (min)); - widest_int lb - = constant_lower_bound_with_limit (wi::to_poly_widest (min), - wi::to_widest (type_min)); - min = wide_int_to_tree (TREE_TYPE (min), lb); - } - if (POLY_INT_CST_P (max)) - { - tree type_max = vrp_val_max (TREE_TYPE (max)); - widest_int ub - = constant_upper_bound_with_limit (wi::to_poly_widest (max), - wi::to_widest (type_max)); - max = wide_int_to_tree (TREE_TYPE (max), ub); - } - } - else if (kind != VR_VARYING) - { - if (POLY_INT_CST_P (min) || POLY_INT_CST_P (max)) - kind = VR_VARYING; - } + + if (kind != VR_VARYING + && (POLY_INT_CST_P (min) || POLY_INT_CST_P (max))) + kind = VR_VARYING; + if (kind == VR_VARYING) { set_varying (TREE_TYPE (min)); |