From: Aldy Hernandez Date: Mon, 7 Oct 2019 09:39:42 +0000 (+0000) Subject: Use value_range_base::num_pairs instead of vrp_val_is* to check if a range X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=3faf75d458529592007436a0972f44e14ebf46f6;p=gcc.git Use value_range_base::num_pairs instead of vrp_val_is* to check if a range has one sub-range. From-SVN: r276653 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 798d16cf0c6..fbb1634cbae 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2019-10-07 Aldy Hernandez + + * tree-vrp.c (value_range_base::singleton_p): Use + value_range_base::num_pairs instead of vrp_val_is* to check + if a range has one sub-range. + 2019-10-07 Richard Sandiford * ira-lives.c (check_and_make_def_conflict): Handle cases in which @@ -179,7 +185,7 @@ 2019-10-04 Aldy Hernandez - (value_range_from_overflowed_bounds): Rename from + * range-op.o (value_range_from_overflowed_bounds): Rename from adjust_overflow_bound. (value_range_with_overflow): Rename from create_range_with_overflow. diff --git a/gcc/tree-vrp.c b/gcc/tree-vrp.c index a2ab4a21925..86e4dace073 100644 --- a/gcc/tree-vrp.c +++ b/gcc/tree-vrp.c @@ -379,10 +379,7 @@ value_range_base::singleton_p (tree *result) const } return false; } - - /* An anti-range that includes an extreme, is just a range with - one sub-range. Use the one sub-range. */ - if (vrp_val_is_min (m_min, true) || vrp_val_is_max (m_max, true)) + if (num_pairs () == 1) { value_range_base vr0, vr1; ranges_from_anti_range (this, &vr0, &vr1, true);