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/range-op-float.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/range-op-float.cc')
-rw-r--r-- | gcc/range-op-float.cc | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/gcc/range-op-float.cc b/gcc/range-op-float.cc index e0e91ba..9d18461 100644 --- a/gcc/range-op-float.cc +++ b/gcc/range-op-float.cc @@ -2263,7 +2263,7 @@ zero_range (REAL_VALUE_TYPE &lb, REAL_VALUE_TYPE &ub, int signbit_known) { ub = lb = dconst0; if (signbit_known <= 0) - lb = real_value_negate (&dconst0); + lb = dconstm0; if (signbit_known < 0) ub = lb; } @@ -2297,7 +2297,7 @@ zero_to_inf_range (REAL_VALUE_TYPE &lb, REAL_VALUE_TYPE &ub, int signbit_known) else if (signbit_known < 0) { lb = dconstninf; - ub = real_value_negate (&dconst0); + ub = dconstm0; } else { @@ -2634,7 +2634,7 @@ private: if (real_isneg (&lh_lb) == real_isneg (&lh_ub)) cp[1] = dconst0; else - cp[1] = real_value_negate (&dconst0); + cp[1] = dconstm0; } else cp[1] = cp[0]; |