diff options
author | Aldy Hernandez <aldyh@redhat.com> | 2022-10-25 22:22:56 +0200 |
---|---|---|
committer | Aldy Hernandez <aldyh@redhat.com> | 2022-10-26 08:07:34 +0200 |
commit | 82866f434cfd724b0d976b034445b7816f6c79f9 (patch) | |
tree | 655fa5e8dd36d5dee9ffab714e7b4445732cea63 /gcc/value-range.cc | |
parent | 978ec4825c2e5cb0ec03d857ea038440d566ff42 (diff) | |
download | gcc-82866f434cfd724b0d976b034445b7816f6c79f9.zip gcc-82866f434cfd724b0d976b034445b7816f6c79f9.tar.gz gcc-82866f434cfd724b0d976b034445b7816f6c79f9.tar.bz2 |
Convert flag_finite_math_only uses in frange to HONOR_*.
As mentioned earlier, we should be using HONOR_* on types rather than
flag_finite_math_only.
gcc/ChangeLog:
* value-range.cc (frange::set): Use HONOR_*.
(frange::verify_range): Same.
* value-range.h (frange_val_min): Same.
(frange_val_max): Same.
Diffstat (limited to 'gcc/value-range.cc')
-rw-r--r-- | gcc/value-range.cc | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/gcc/value-range.cc b/gcc/value-range.cc index d8ee6ec..77e5a2c 100644 --- a/gcc/value-range.cc +++ b/gcc/value-range.cc @@ -341,7 +341,7 @@ frange::set (tree type, // For -ffinite-math-only we can drop ranges outside the // representable numbers to min/max for the type. - if (flag_finite_math_only) + if (!HONOR_INFINITIES (m_type)) { REAL_VALUE_TYPE min_repr = frange_val_min (m_type); REAL_VALUE_TYPE max_repr = frange_val_max (m_type); @@ -712,8 +712,8 @@ frange::supports_type_p (const_tree type) const void frange::verify_range () { - if (flag_finite_math_only) - gcc_checking_assert (!maybe_isnan ()); + if (!undefined_p ()) + gcc_checking_assert (HONOR_NANS (m_type) || !maybe_isnan ()); switch (m_kind) { case VR_UNDEFINED: |