From: Marc Glisse <marc.glisse@inria.fr>
To: Eugene Rozenfeld <Eugene.Rozenfeld@microsoft.com>
Cc: Jeff Law <law@redhat.com>,
"gcc-patches@gcc.gnu.org" <gcc-patches@gcc.gnu.org>
Subject: Re: [PATCH] [tree-optimization] Optimize max/min pattern with comparison
Date: Sun, 6 Dec 2020 10:29:08 +0100 (CET) [thread overview]
Message-ID: <e221219a-5846-6078-bb89-8f5053895d1a@stedding.saclay.inria.fr> (raw)
In-Reply-To: <BYAPR21MB1351FCA6433277C8B2E215F991F41@BYAPR21MB1351.namprd21.prod.outlook.com>
On Tue, 1 Dec 2020, Eugene Rozenfeld via Gcc-patches wrote:
> Thank you for the review Jeff.
>
> I don't need to look at the opcode to know the result. The pattern will be matched only in these 4 cases:
>
> X <= MAX(X, Y) -> true
> X > MAX(X, Y) -> false
> X >= MIN(X, Y) -> true
> X < MIN(X, Y) -> false
>
> So, the result will be true for GE_EXPR and LE_EXPR and false otherwise.
Is that true even if X is NaN?
It may be hard to hit a situation where this matters though, if we honor
NaN, we don't build MAX_EXPR (which is unspecified).
--
Marc Glisse
next prev parent reply other threads:[~2020-12-06 9:29 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-12-01 2:00 Eugene Rozenfeld
2020-12-01 6:30 ` Jeff Law
2020-12-01 23:29 ` Jeff Law
2020-12-06 9:29 ` Marc Glisse [this message]
-- strict thread matches above, loose matches on Subject: below --
2020-11-25 22:04 Eugene Rozenfeld
2020-11-30 17:51 ` 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=e221219a-5846-6078-bb89-8f5053895d1a@stedding.saclay.inria.fr \
--to=marc.glisse@inria.fr \
--cc=Eugene.Rozenfeld@microsoft.com \
--cc=gcc-patches@gcc.gnu.org \
--cc=law@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).