From: HAO CHEN GUI <guihaoc@linux.ibm.com>
To: Segher Boessenkool <segher@kernel.crashing.org>
Cc: gcc-patches <gcc-patches@gcc.gnu.org>, David <dje.gcc@gmail.com>,
"Kewen.Lin" <linkw@linux.ibm.com>,
Peter Bergner <bergner@linux.ibm.com>
Subject: Re: [PATCH v3] Modify combine pattern by a pseudo AND with its nonzero bits [PR93453]
Date: Thu, 11 Aug 2022 10:11:45 +0800 [thread overview]
Message-ID: <d87d19c9-becb-a453-42c1-09b046511930@linux.ibm.com> (raw)
In-Reply-To: <20220810173852.GC25951@gate.crashing.org>
Hi Segher,
Really appreciate your review comments.
On 11/8/2022 上午 1:38, Segher Boessenkool wrote:
> Hi!
>
> Sorry for the tardiness.
>
> On Fri, Jul 22, 2022 at 03:07:55PM +0800, HAO CHEN GUI wrote:
>> This patch creates a new function - change_pseudo_and_mask. If recog fails,
>> the function converts a single pseudo to the pseudo AND with a mask if the
>> outer operator is IOR/XOR/PLUS and inner operator is ASHIFT or AND. The
>> conversion helps pattern to match rotate and mask insn on some targets.
>
> The name isn't so clear. It isn't changing a mask, to start with.
How about setting function name to change_pseudo? It converts a pseudo to
the pseudo AND with a mask in a particular situation.
>
>> +/* When the outer code of set_src is IOR/XOR/PLUS and the inner code is
>> + ASHIFT/AND,
>
> "When the outercode of the SET_SRC of PAT is ..."
Yeah, I will change it.
>
>> convert a pseudo to pseudo AND with a mask if its nonzero_bits
>> + is less than its mode mask. The nonzero_bits in later passes is not a
>> + superset of what is known in combine pass. So an insn with nonzero_bits
>> + can't be recoged later. */
>
> Can this not be done with a splitter in the machine description?
>
Sorry, I don't quite understand it. Do you mean if the conversion can be done in
split pass?
If a pseudo has DImode and stem from a char, we get nonzero_bits as 0xff in combine
pass. But in split pass, it's nonzero_bits is 0xffffffffffffffff. So the conversion
can only be done in combine pass.
Thanks
Gui Haochen
next prev parent reply other threads:[~2022-08-11 2:11 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-07-22 7:07 HAO CHEN GUI
2022-08-01 2:00 ` Ping " HAO CHEN GUI
2022-08-10 17:38 ` Segher Boessenkool
2022-08-11 2:11 ` HAO CHEN GUI [this message]
2022-08-11 17:40 ` Segher Boessenkool
2022-08-12 8:04 ` HAO CHEN GUI
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=d87d19c9-becb-a453-42c1-09b046511930@linux.ibm.com \
--to=guihaoc@linux.ibm.com \
--cc=bergner@linux.ibm.com \
--cc=dje.gcc@gmail.com \
--cc=gcc-patches@gcc.gnu.org \
--cc=linkw@linux.ibm.com \
--cc=segher@kernel.crashing.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).