public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Jeff Law <jeffreyalaw@gmail.com>
To: Andrew Pinski <apinski@marvell.com>, gcc-patches@gcc.gnu.org
Subject: Re: [PATCH] MATCH: [PR109424] Simplify min/max of boolean arguments
Date: Mon, 15 May 2023 21:23:44 -0600	[thread overview]
Message-ID: <e2349821-81d6-27df-b799-d2e840bd5c68@gmail.com> (raw)
In-Reply-To: <20230516013655.1660657-1-apinski@marvell.com>



On 5/15/23 19:36, Andrew Pinski via Gcc-patches wrote:
> This is version 2 of https://gcc.gnu.org/pipermail/gcc-patches/2021-August/577394.html
> which does not depend on adding gimple_truth_valued_p at this point.
> Instead will use zero_one_valued_p which is already used for mult simplifications
> to make sure that we only have [0,1] rather having the mistake of maybe having [-1,0]
> as the range for signed bools.
> 
> This shows up in a few places in GCC itself but only at -O1, we miss the min/max conversion
> because of PR 107888 (which I will be testing seperately).
> 
> OK? Bootstrapped and tested on x86_64-linux-gnu with no regressions.
> 
> Thanks,
> Andrew Pinski
> 
> 	PR tree-optimization/109424
> 
> gcc/ChangeLog:
> 
> 	* match.pd: Add patterns for min/max of zero_one_valued
> 	values to `&`/`|`.
Not sure it buys us a whole lot.  I guess the strongest argument is 
probably that turning it into a logical helps on targets without min/max 
support.

OK.

jeff

      reply	other threads:[~2023-05-16  3:23 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-05-16  1:36 Andrew Pinski
2023-05-16  3:23 ` Jeff Law [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=e2349821-81d6-27df-b799-d2e840bd5c68@gmail.com \
    --to=jeffreyalaw@gmail.com \
    --cc=apinski@marvell.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).