public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Michael Matz <matz@suse.de>
To: Andrew Pinski <apinski@marvell.com>
Cc: gcc-patches@gcc.gnu.org
Subject: Re: [PATCH] tree-optimization: [PR102622]: wrong code due to signed one bit integer and "a?-1:0"
Date: Mon, 11 Oct 2021 13:07:17 +0000 (UTC)	[thread overview]
Message-ID: <alpine.LSU.2.20.2110111303470.26294@wotan.suse.de> (raw)
In-Reply-To: <1633844539-26219-1-git-send-email-apinski@marvell.com>

Hello,

On Sat, 9 Oct 2021, apinski--- via Gcc-patches wrote:

> +      (lshift (convert (convert:boolean_type_node @0)) { shift; })))
> +    /* a ? -1 : 0 -> -a.  No need to check the TYPE_PRECISION not being 1
> +       here as the powerof2cst case above will handle that case correctly.  */

Well, but the QoI will improve quite a bit when you just do the check, 
instead of relying on order of patterns.  It's not slow or harmful to 
check and will make the order irrelevant, which, given the number of 
patterns we already have, is a good thing.  (It will also be smaller to 
check than to document why the check isn't needed :-) )


Ciao,
Michael.

      parent reply	other threads:[~2021-10-11 13:07 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-10-10  5:42 apinski
2021-10-10  8:03 ` Richard Biener
2021-10-11 13:07 ` Michael Matz [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=alpine.LSU.2.20.2110111303470.26294@wotan.suse.de \
    --to=matz@suse.de \
    --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).