From: Jakub Jelinek <jakub@redhat.com>
To: Aldy Hernandez <aldyh@redhat.com>
Cc: GCC patches <gcc-patches@gcc.gnu.org>,
Andrew MacLeod <amacleod@redhat.com>
Subject: Re: [PATCH] Do not specify NAN sign in frange::set_nonnegative.
Date: Thu, 10 Nov 2022 16:40:04 +0100 [thread overview]
Message-ID: <Y20bVAD9kPugPxF4@tucnak> (raw)
In-Reply-To: <20221110150345.157116-1-aldyh@redhat.com>
On Thu, Nov 10, 2022 at 04:03:46PM +0100, Aldy Hernandez wrote:
> [Jakub, how's this? Do you agree?]
>
> After further reading of the IEEE 754 standard, it has become clear
> that there are no guarantees with regards to the sign of a NAN when it
> comes to any operation other than copy, copysign, abs, and negate.
>
> Currently, set_nonnegative() is only used in one place in ranger
> applicable to floating point values, when expanding unknown calls.
> Since we already specially handle copy, copysign, abs, and negate, all
> the calls to set_nonnegative() must be NAN-sign agnostic.
>
> The cleanest solution is to leave the sign unspecificied in
> frange::set_nonnegative(). Any special case, must be handled by the
> caller.
>
> gcc/ChangeLog:
>
> * value-range.cc (frange::set_nonnegative): Remove NAN sign handling.
> (range_tests_signed_zeros): Adjust test.
LGTM, thanks.
Jakub
prev parent reply other threads:[~2022-11-10 15:40 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-11-10 15:03 Aldy Hernandez
2022-11-10 15:40 ` Jakub Jelinek [this message]
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=Y20bVAD9kPugPxF4@tucnak \
--to=jakub@redhat.com \
--cc=aldyh@redhat.com \
--cc=amacleod@redhat.com \
--cc=gcc-patches@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: 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).