From: Jakub Jelinek <jakub@redhat.com>
To: "juzhe.zhong@rivai.ai" <juzhe.zhong@rivai.ai>
Cc: rguenther <rguenther@suse.de>, Robin Dapp <rdapp.gcc@gmail.com>,
gcc-patches <gcc-patches@gcc.gnu.org>,
"pan2.li" <pan2.li@intel.com>,
"richard.sandiford" <richard.sandiford@arm.com>,
Richard Biener <richard.guenther@gmail.com>,
pinskia <pinskia@gmail.com>
Subject: Re: Re: [PATCH] fold-const: Handle AND, IOR, XOR with stepped vectors [PR112971].
Date: Tue, 19 Dec 2023 10:55:12 +0100 [thread overview]
Message-ID: <ZYFogDpvk4TDcg7M@tucnak> (raw)
In-Reply-To: <9D6DD5FAB9816EB2+202312191749474308727@rivai.ai>
On Tue, Dec 19, 2023 at 05:49:48PM +0800, juzhe.zhong@rivai.ai wrote:
> >> (x & -1) == x
> >>(x | -1) == -1
> >>(x ^ -1) == ~x
>
> Looks reasonable to me.
>
> Do you mean modify the code as follows ?
>
> if (integer_zerop (arg1) || integer_zerop (arg2)) || integer_onep (arg1) || integer_onep(arg2))
That is too long line and integer_onep is not integer_all_onesp (and for
integer_onep something like that certainly doesn't apply).
Plus it needs to be tested it does the right thing.
> step_ok_p = (code == BIT_AND_EXPR || code == BIT_IOR_EXPR
> || code == BIT_XOR_EXPR);
Jakub
next prev parent reply other threads:[~2023-12-19 9:55 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-12-18 19:50 Robin Dapp
2023-12-18 22:49 ` 钟居哲
2023-12-19 8:15 ` Richard Biener
2023-12-19 8:54 ` juzhe.zhong
2023-12-19 9:12 ` Richard Biener
2023-12-19 9:35 ` juzhe.zhong
2023-12-19 9:45 ` Jakub Jelinek
2023-12-19 9:49 ` juzhe.zhong
2023-12-19 9:55 ` Jakub Jelinek [this message]
2023-12-19 10:11 ` Richard Biener
2023-12-19 10:40 ` Richard Sandiford
2023-12-19 10:58 ` juzhe.zhong
2023-12-20 2:04 ` Andrew Pinski
2023-12-20 2:07 ` juzhe.zhong
2023-12-20 7:25 ` Richard Biener
2023-12-20 9:33 ` Richard Sandiford
2023-12-20 10:06 ` Richard Biener
2024-01-15 15:23 ` Robin Dapp
2024-01-16 7:17 ` Richard Biener
2024-01-24 11:29 ` Richard Sandiford
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=ZYFogDpvk4TDcg7M@tucnak \
--to=jakub@redhat.com \
--cc=gcc-patches@gcc.gnu.org \
--cc=juzhe.zhong@rivai.ai \
--cc=pan2.li@intel.com \
--cc=pinskia@gmail.com \
--cc=rdapp.gcc@gmail.com \
--cc=rguenther@suse.de \
--cc=richard.guenther@gmail.com \
--cc=richard.sandiford@arm.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).