From: Aldy Hernandez Date: Fri, 14 Oct 2022 14:49:33 +0000 (+0200) Subject: Implement distinction between HONOR_SIGNED_ZEROS and MODE_HAS_SIGNED_ZEROS. X-Git-Tag: basepoints/gcc-14~3899 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b4a4c6382b14bc107d6d95ff809f3e9cd71944e7;p=thirdparty%2Fgcc.git 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. --- diff --git a/gcc/value-range.cc b/gcc/value-range.cc index ee15eb35df88..4794d2386a80 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.