public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Aldy Hernandez <aldyh@redhat.com>
To: Toon Moene <toon@moene.org>
Cc: Jakub Jelinek <jakub@redhat.com>,
	gcc-patches <gcc-patches@gcc.gnu.org>,
	 "MacLeod, Andrew" <amacleod@redhat.com>
Subject: Re: [PATCH] Add support for floating point endpoints to frange.
Date: Tue, 30 Aug 2022 11:27:23 +0200	[thread overview]
Message-ID: <CAGm3qMUTzheCyrT71Vx0feA4SwgMZyoLTc1TTU3SoJ4NJK3YfQ@mail.gmail.com> (raw)
In-Reply-To: <36232923-497e-0de4-414f-41c1b33fbb30@moene.org>

[-- Attachment #1: Type: text/plain, Size: 1779 bytes --]

OK, I'm good to go.

As the patch was getting rather large, I have split it into two parts.
The first is the core endpoints support to frange along with removal
of the +-INF markers (since they are no longer needed).  The second
part is the FP relational operators.  Splitting it up should help in
reviewing/improving the code for readers.  Also, it always helps
regression hunting to have smaller pieces ;-).

Retested on x86-64 Linux.

Pushed.




On Mon, Aug 29, 2022 at 4:42 PM Toon Moene <toon@moene.org> wrote:
>
> On 8/29/22 16:36, Aldy Hernandez wrote:
>
> > On Mon, Aug 29, 2022 at 4:30 PM Toon Moene <toon@moene.org> wrote:
> >>
> >> On 8/29/22 16:15, Aldy Hernandez wrote:
> >>
> >>> But even with -ffinite-math-only, is there any benefit to propagating
> >>> a known NAN?  For example:
> >>
> >> The original intent (in 2002) for the option -ffinite-math-only was for
> >> the optimizers to ignore all the various exceptions to common
> >> optimizations because they might not work correctly when presented with
> >> a NaN or an Inf.
> >>
> >> I do not know what the effect for floating point range information would
> >> be - offhand.
> >>
> >> But in the *spirit* of this option would be to ignore that the range
> >> [5.0, 5.0] would "also" contain NaN, for instance.
> >
> > Hmm, this is somewhat similar to what Jakub suggested.  Perhaps we
> > could categorically set !NAN for !HONOR_NANS at frange construction
> > time?
> >
> > For reference:
> > bool
> > HONOR_NANS (machine_mode m)
> > {
> >    return MODE_HAS_NANS (m) && !flag_finite_math_only;
> > }
> >
> > Thanks.
> > Aldy
> >
>
> Yep, I think that would do it.
>
> Thanks,
>
> --
> Toon Moene - e-mail: toon@moene.org - phone: +31 346 214290
> Saturnushof 14, 3738 XG  Maartensdijk, The Netherlands
>

[-- Attachment #2: 0002-Add-support-for-floating-point-endpoints-to-frange.patch --]
[-- Type: application/x-patch, Size: 31817 bytes --]

[-- Attachment #3: 0003-Implement-relational-operators-for-frange-with-endpo.patch --]
[-- Type: application/x-patch, Size: 18049 bytes --]

  reply	other threads:[~2022-08-30  9:27 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-08-23 11:42 Aldy Hernandez
2022-08-26 15:55 ` Aldy Hernandez
2022-08-26 17:40   ` Andrew Pinski
2022-08-26 18:11     ` Aldy Hernandez
2022-08-26 18:11       ` Aldy Hernandez
2022-08-26 19:16     ` Aldy Hernandez
2022-08-26 19:44       ` Andrew Pinski
2022-08-29 13:45         ` Aldy Hernandez
2022-08-29 13:54           ` Jakub Jelinek
2022-08-29 14:07             ` Toon Moene
2022-08-29 14:15               ` Aldy Hernandez
2022-08-29 14:30                 ` Toon Moene
2022-08-29 14:36                   ` Aldy Hernandez
2022-08-29 14:42                     ` Toon Moene
2022-08-30  9:27                       ` Aldy Hernandez [this message]
2022-08-31 15:22                       ` Jeff Law
2022-08-31 15:19                 ` Jeff Law
2022-08-29 14:08             ` Aldy Hernandez
2022-08-29 14:17               ` Jakub Jelinek
2022-08-29 14:20                 ` Aldy Hernandez
2022-08-29 14:27                   ` Jakub Jelinek
2022-08-29 14:30                     ` Aldy Hernandez
2022-08-31 15:24                       ` Jeff Law
2022-08-30 22:32             ` Joseph Myers
2022-08-31 15:16             ` Jeff Law

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=CAGm3qMUTzheCyrT71Vx0feA4SwgMZyoLTc1TTU3SoJ4NJK3YfQ@mail.gmail.com \
    --to=aldyh@redhat.com \
    --cc=amacleod@redhat.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=jakub@redhat.com \
    --cc=toon@moene.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).