public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Jeff Law <law@redhat.com>
To: Eugene Rozenfeld <Eugene.Rozenfeld@microsoft.com>,
	"gcc-patches@gcc.gnu.org" <gcc-patches@gcc.gnu.org>
Subject: Re: [PATCH] [tree-optimization] Optimize max/min pattern with comparison
Date: Tue, 1 Dec 2020 16:29:25 -0700	[thread overview]
Message-ID: <11bdba8e-e7b2-fdff-2e96-b17512d56ec8@redhat.com> (raw)
In-Reply-To: <BYAPR21MB1351FCA6433277C8B2E215F991F41@BYAPR21MB1351.namprd21.prod.outlook.com>



On 11/30/20 7:00 PM, Eugene Rozenfeld 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.
>
> I added two test files: one for positive cases and one for negative cases. The updated patch is attached.
Thanks.  Installed.

jeff


  parent reply	other threads:[~2020-12-01 23: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 [this message]
2020-12-06  9:29 ` Marc Glisse
  -- 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=11bdba8e-e7b2-fdff-2e96-b17512d56ec8@redhat.com \
    --to=law@redhat.com \
    --cc=Eugene.Rozenfeld@microsoft.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).