public inbox for gcc-cvs@sourceware.org help / color / mirror / Atom feed
From: Aldy Hernandez <aldyh@gcc.gnu.org> To: gcc-cvs@gcc.gnu.org Subject: [gcc r13-3308] Implement distinction between HONOR_SIGNED_ZEROS and MODE_HAS_SIGNED_ZEROS. Date: Fri, 14 Oct 2022 17:40:12 +0000 (GMT) [thread overview] Message-ID: <20221014174012.088403858D38@sourceware.org> (raw) https://gcc.gnu.org/g:b4a4c6382b14bc107d6d95ff809f3e9cd71944e7 commit r13-3308-gb4a4c6382b14bc107d6d95ff809f3e9cd71944e7 Author: Aldy Hernandez <aldyh@redhat.com> Date: Fri Oct 14 16:49:33 2022 +0200 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: --- gcc/value-range.cc | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/gcc/value-range.cc b/gcc/value-range.cc index ee15eb35df8..4794d2386a8 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.
reply other threads:[~2022-10-14 17:40 UTC|newest] Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20221014174012.088403858D38@sourceware.org \ --to=aldyh@gcc.gnu.org \ --cc=gcc-cvs@gcc.gnu.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).