diff options
author | Aldy Hernandez <aldyh@redhat.com> | 2023-04-12 14:05:57 +0200 |
---|---|---|
committer | Aldy Hernandez <aldyh@redhat.com> | 2023-04-18 16:05:37 +0200 |
commit | 19cb965e9d16e875944a31173b5e79b65e25d0de (patch) | |
tree | b2ca1f5272d8919ecac6ef2c7ddf25666e0e311d /gcc/value-range.cc | |
parent | 278f8f567b5470e87e2e6482ee385d61c7f45a5d (diff) | |
download | gcc-19cb965e9d16e875944a31173b5e79b65e25d0de.zip gcc-19cb965e9d16e875944a31173b5e79b65e25d0de.tar.gz gcc-19cb965e9d16e875944a31173b5e79b65e25d0de.tar.bz2 |
Declare dconstm0 to go along with dconst0 and friends.
Negating dconst0 is getting pretty old, and we will keep adding copies
of the same idiom. Fixed by adding a dconstm0 constant to go along
with dconst1, dconstm1, etc.
gcc/ChangeLog:
* emit-rtl.cc (init_emit_once): Initialize dconstm0.
* gimple-range-op.cc (class cfn_signbit): Remove dconstm0
declaration.
* range-op-float.cc (zero_range): Use dconstm0.
(zero_to_inf_range): Same.
* real.h (dconstm0): New.
* value-range.cc (frange::flush_denormals_to_zero): Use dconstm0.
(frange::set_zero): Do not declare dconstm0.
Diffstat (limited to 'gcc/value-range.cc')
-rw-r--r-- | gcc/value-range.cc | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/gcc/value-range.cc b/gcc/value-range.cc index 8b5d0cb..3b3102b 100644 --- a/gcc/value-range.cc +++ b/gcc/value-range.cc @@ -322,9 +322,10 @@ frange::flush_denormals_to_zero () // Flush [x, -DENORMAL] to [x, -0.0]. if (real_isdenormal (&m_max, mode) && real_isneg (&m_max)) { - m_max = dconst0; if (HONOR_SIGNED_ZEROS (m_type)) - m_max.sign = 1; + m_max = dconstm0; + else + m_max = dconst0; } // Flush [+DENORMAL, x] to [+0.0, x]. if (real_isdenormal (&m_min, mode) && !real_isneg (&m_min)) @@ -837,8 +838,6 @@ frange::set_zero (tree type) { if (HONOR_SIGNED_ZEROS (type)) { - REAL_VALUE_TYPE dconstm0 = dconst0; - dconstm0.sign = 1; set (type, dconstm0, dconst0); clear_nan (); } |