From: Takayuki 'January June' Suwa <jjsuwa_sys3175@yahoo.co.jp>
To: Max Filippov <jcmvbkbc@gmail.com>
Cc: GCC Patches <gcc-patches@gcc.gnu.org>
Subject: Re: [PATCH 2/3 v3] xtensa: Add 'adddi3' and 'subdi3' insn patterns
Date: Fri, 2 Jun 2023 00:36:20 +0900 [thread overview]
Message-ID: <10fa53ac-8de7-b998-661b-c92f3e725c8a@yahoo.co.jp> (raw)
In-Reply-To: <CAMo8BfK7jyuijNBcm=WAEXFKTC8svrLKCydKdxSor8Gkoz1vxg@mail.gmail.com>
On 2023/06/01 23:20, Max Filippov wrote:
> On Wed, May 31, 2023 at 11:01 PM Takayuki 'January June' Suwa
> <jjsuwa_sys3175@yahoo.co.jp> wrote:
>> More optimized than the default RTL generation.
>>
>> gcc/ChangeLog:
>>
>> * config/xtensa/xtensa.md (adddi3, subdi3):
>> New RTL generation patterns implemented according to the instruc-
>> tion idioms described in the Xtensa ISA reference manual (p. 600).
>> ---
>> gcc/config/xtensa/xtensa.md | 52 +++++++++++++++++++++++++++++++++++++
>> 1 file changed, 52 insertions(+)
>>
>> diff --git a/gcc/config/xtensa/xtensa.md b/gcc/config/xtensa/xtensa.md
>> index eda1353894b..21afa747e89 100644
>> --- a/gcc/config/xtensa/xtensa.md
>> +++ b/gcc/config/xtensa/xtensa.md
>> @@ -190,6 +190,35 @@
>> (set_attr "mode" "SI")
>> (set_attr "length" "3")])
>>
>> +(define_expand "adddi3"
>> + [(set (match_operand:DI 0 "register_operand")
>> + (plus:DI (match_operand:DI 1 "register_operand")
>> + (match_operand:DI 2 "register_operand")))]
>> + ""
>> +{
>> + rtx lo_dest, hi_dest, lo_op0, hi_op0, lo_op1, hi_op1;
>> + rtx_code_label *label;
>> + if (rtx_equal_p (operands[0], operands[1])
>> + || rtx_equal_p (operands[0], operands[2])
>
>> + || ! REG_P (operands[1]) || ! REG_P (operands[2]))
>
> I wonder if these additional conditions are necessary, given that
> the operands have the "register_operand" predicates?
>
See register_operand() in gcc/recog.cc.
In fact, I've encountered several operands that satisfy the
register_operand predicate but result in REG_P() being false.
prev parent reply other threads:[~2023-06-01 15:36 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <95b8b130-caef-12c8-b247-25ec7dbf0ac3.ref@yahoo.co.jp>
2023-05-30 9:50 ` [PATCH 2/3 v2] " Takayuki 'January June' Suwa
2023-05-31 6:02 ` Max Filippov
2023-06-01 6:01 ` [PATCH 2/3 v3] " Takayuki 'January June' Suwa
2023-06-01 14:16 ` Max Filippov
2023-06-01 14:20 ` Max Filippov
2023-06-01 15:36 ` Takayuki 'January June' Suwa [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=10fa53ac-8de7-b998-661b-c92f3e725c8a@yahoo.co.jp \
--to=jjsuwa_sys3175@yahoo.co.jp \
--cc=gcc-patches@gcc.gnu.org \
--cc=jcmvbkbc@gmail.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).