From: Jakub Jelinek <jakub@redhat.com>
To: Richard Biener <richard.guenther@gmail.com>
Cc: Richard Biener <rguenther@suse.de>,
GCC Patches <gcc-patches@gcc.gnu.org>,
"Joseph S. Myers" <joseph@codesourcery.com>
Subject: Re: [PATCH] middle-end/103193 - avoid canonicalizing <= and >= to == for floats
Date: Wed, 24 Nov 2021 10:03:53 +0100 [thread overview]
Message-ID: <20211124090353.GK2646553@tucnak> (raw)
In-Reply-To: <CAFiYyc2u_Sr6o2EPJorxrhNm7pjQsbmPasoN+VAURpVLfjgC2Q@mail.gmail.com>
On Wed, Nov 24, 2021 at 10:00:56AM +0100, Richard Biener via Gcc-patches wrote:
> On Mon, Nov 15, 2021 at 12:16 PM Richard Biener via Gcc-patches
> <gcc-patches@gcc.gnu.org> wrote:
> >
> > This avoids doing aforementioned canoncalization when -ftrapping-math
> > is in effect and we honor NaNs.
> >
> > Bootstrapped and tested on x86_64-unknown-linux-gnu.
> >
> > OK?
>
> Ping.
>
> >
> > Thanks,
> > Richard.
> >
> > 2021-11-15 Richard Biener <rguenther@suse.de>
> >
> > PR middle-end/103193
> > * match.pd: Avoid canonicalizing (le/ge @0 @0) to (eq @0 @0)
> > with NaNs and -ftrapping-math.
Ok, thanks.
> > gcc/match.pd | 5 ++++-
> > 1 file changed, 4 insertions(+), 1 deletion(-)
> >
> > diff --git a/gcc/match.pd b/gcc/match.pd
> > index a319aefa808..a7f1e56fe2f 100644
> > --- a/gcc/match.pd
> > +++ b/gcc/match.pd
> > @@ -4629,7 +4629,10 @@ DEFINE_INT_AND_FLOAT_ROUND_FN (RINT)
> > (if (! FLOAT_TYPE_P (TREE_TYPE (@0))
> > || ! HONOR_NANS (@0))
> > { constant_boolean_node (true, type); }
> > - (if (cmp != EQ_EXPR)
> > + (if (cmp != EQ_EXPR
> > + /* With -ftrapping-math conversion to EQ loses an exception. */
> > + && (! FLOAT_TYPE_P (TREE_TYPE (@0))
> > + || ! flag_trapping_math))
> > (eq @0 @0)))))
> > (for cmp (ne gt lt)
> > (simplify
> > --
> > 2.31.1
Jakub
prev parent reply other threads:[~2021-11-24 9:04 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-11-15 11:16 Richard Biener
2021-11-24 9:00 ` Richard Biener
2021-11-24 9:03 ` 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=20211124090353.GK2646553@tucnak \
--to=jakub@redhat.com \
--cc=gcc-patches@gcc.gnu.org \
--cc=joseph@codesourcery.com \
--cc=rguenther@suse.de \
--cc=richard.guenther@gmail.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).