From: Jakub Jelinek <jakub@redhat.com>
To: Richard Biener <rguenther@suse.de>
Cc: Jeff Law <law@redhat.com>, Marc Glisse <marc.glisse@inria.fr>,
gcc-patches@gcc.gnu.org
Subject: Re: [PATCH] Fold (x + 0.0) + 0.0 to x + 0.0 (PR tree-optimization/90356)
Date: Tue, 07 May 2019 07:55:00 -0000 [thread overview]
Message-ID: <20190507075521.GH2706@tucnak> (raw)
In-Reply-To: <alpine.LSU.2.20.1905070942170.10704@zhemvz.fhfr.qr>
On Tue, May 07, 2019 at 09:48:13AM +0200, Richard Biener wrote:
> Will leave the "correctness check" for other folks but the above is
> better written as
>
> + (outer_op (inner_op @0 REAL_CST@1) REAL_CST@2)
> + (if (real_zerop (@1)
> + && real_zerop (@2)
>
> because that gets code-generated better. Btw, for -fsignalling-nans
Ok, will change. I want to introduce uniform_real_cst_p similar to
uniform_integer_cst_p incrementally and then it will change again.
> can we have a literal sNaN? Then you need :c on the inner_op since
> I'm not sure we canonicalize to sNaN + 0.0 rather than 0.0 + sNaN.
I had :c on both initially, but that doesn't compile, because MINUS_EXPR
is not commutative. And I wanted to avoid writing 4 patterns instead of 1.
> Maybe not worth optimizing though (since we rule out -frounding-math
> a similar case there doesn't need to be considered).
>
> > + && HONOR_SIGNED_ZEROS (element_mode (type))
> > + && !HONOR_SIGN_DEPENDENT_ROUNDING (element_mode (type)))
>
> You can write HONOR_SIGNED_ZEROS (type) here for brevity.
Ok, will do (and change it then in fold_real_zero_addition_p as well).
Jakub
next prev parent reply other threads:[~2019-05-07 7:55 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-05-07 7:21 Jakub Jelinek
2019-05-07 7:48 ` Richard Biener
2019-05-07 7:55 ` Jakub Jelinek [this message]
2019-05-07 9:11 ` Jakub Jelinek
2019-05-07 11:50 ` Marc Glisse
2019-05-07 12:58 ` Jakub Jelinek
2019-05-07 13:04 ` Richard Biener
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=20190507075521.GH2706@tucnak \
--to=jakub@redhat.com \
--cc=gcc-patches@gcc.gnu.org \
--cc=law@redhat.com \
--cc=marc.glisse@inria.fr \
--cc=rguenther@suse.de \
/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).