From: Aldy Hernandez <aldyh@redhat.com>
To: Jakub Jelinek <jakub@redhat.com>
Cc: gcc@gcc.gnu.org, amacleod@redhat.com
Subject: are most floating point cases in tree_call_nonnegative_warnv_p() wrong for HONOR_NANS?
Date: Sun, 13 Nov 2022 16:56:50 +0100 [thread overview]
Message-ID: <2afa474d-79a0-c978-f881-bd71f8016585@redhat.com> (raw)
Based on discussions in the last few weeks, aren't most of the cases in
tree_call_nonnegative_warnv_p() wrong when honoring NANS?
For example:
CASE_CFN_ACOS:
CASE_CFN_ACOS_FN:
CASE_CFN_ACOSH:
CASE_CFN_ACOSH_FN:
...
...
/* Always true. */
return true;
But are we guaranteed a +NAN for any NAN input? I thought we were only
guaranteed the NAN sign for abs, copysign, assignment, etc? Similarly
for most other cases in this function.
Hmmm. I really think a good chunk of fold-const.cc should live in
range-ops. It seems we're duplicating a lot of functionality.
Similarly to bit-CCP as I've mentioned.
Aldy
next reply other threads:[~2022-11-13 15:56 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-11-13 15:56 Aldy Hernandez [this message]
2022-11-13 18:49 ` Aldy Hernandez
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=2afa474d-79a0-c978-f881-bd71f8016585@redhat.com \
--to=aldyh@redhat.com \
--cc=amacleod@redhat.com \
--cc=gcc@gcc.gnu.org \
--cc=jakub@redhat.com \
/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: link
Be 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).