diff options
author | Aldy Hernandez <aldyh@redhat.com> | 2022-10-14 16:49:33 +0200 |
---|---|---|
committer | Aldy Hernandez <aldyh@redhat.com> | 2022-10-14 18:43:50 +0200 |
commit | b4a4c6382b14bc107d6d95ff809f3e9cd71944e7 (patch) | |
tree | 0e85663c46b4bbd6c09d1ead0d68bda2fbbc0b18 /gcc | |
parent | 8efc38347a7444dde3fb173f0f2c59a60b7db53d (diff) | |
download | gcc-b4a4c6382b14bc107d6d95ff809f3e9cd71944e7.zip gcc-b4a4c6382b14bc107d6d95ff809f3e9cd71944e7.tar.gz gcc-b4a4c6382b14bc107d6d95ff809f3e9cd71944e7.tar.bz2 |
Implement distinction between HONOR_SIGNED_ZEROS and MODE_HAS_SIGNED_ZEROS.
gcc/ChangeLog:
* value-range.cc (frange::set): Implement distinction between
HONOR_SIGNED_ZEROS and MODE_HAS_SIGNED_ZEROS.
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/value-range.cc | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/gcc/value-range.cc b/gcc/value-range.cc index ee15eb3..4794d23 100644 --- a/gcc/value-range.cc +++ b/gcc/value-range.cc @@ -324,13 +324,20 @@ frange::set (tree type, m_neg_nan = false; } - if (!HONOR_SIGNED_ZEROS (m_type)) + if (!MODE_HAS_SIGNED_ZEROS (TYPE_MODE (m_type))) { if (real_iszero (&m_min, 1)) m_min.sign = 0; if (real_iszero (&m_max, 1)) m_max.sign = 0; } + else if (!HONOR_SIGNED_ZEROS (m_type)) + { + if (real_iszero (&m_max, 1)) + m_max.sign = 0; + if (real_iszero (&m_min, 0)) + m_min.sign = 1; + } // For -ffinite-math-only we can drop ranges outside the // representable numbers to min/max for the type. |