From: Jeff Law <jeffreyalaw@gmail.com>
To: Andrew Pinski <apinski@marvell.com>, gcc-patches@gcc.gnu.org
Subject: Re: [PATCH 1/2] Match: zero_one_valued_p should match 0 constants too
Date: Tue, 6 Jun 2023 20:28:07 -0600 [thread overview]
Message-ID: <92260d32-42eb-0afe-6346-6ba9663ae174@gmail.com> (raw)
In-Reply-To: <20230607001706.3000011-1-apinski@marvell.com>
On 6/6/23 18:17, Andrew Pinski via Gcc-patches wrote:
> While working on `bool0 ? bool1 : bool2` I noticed that
> zero_one_valued_p does not match on the constant zero
> as in that case tree_nonzero_bits will return 0 and
> that is different from 1.
>
> OK? Bootstrapped and tested on x86_64-linux-gnu with no regressions.
>
> gcc/ChangeLog:
>
> * match.pd (zero_one_valued_p): Match 0 integer constant
> too.
Presumably "1" is matched by the tree_nonzero_bits (@0) == 1. So OK.
jeff
next prev parent reply other threads:[~2023-06-07 2:28 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-06-07 0:17 Andrew Pinski
2023-06-07 0:17 ` [PATCH 2/2] Add match patterns for `a ? onezero : onezero` where one of the two operands are constant Andrew Pinski
2023-06-07 2:33 ` Jeff Law
2023-06-07 2:28 ` Jeff Law [this message]
2023-06-07 7:12 ` [PATCH 1/2] Match: zero_one_valued_p should match 0 constants too Jakub Jelinek
2023-06-07 13:03 ` 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=92260d32-42eb-0afe-6346-6ba9663ae174@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).