public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Philipp Tomsich <philipp.tomsich@vrull.eu>
To: Jeff Law <jeffreyalaw@gmail.com>
Cc: Lin Sinan <mynameisxiaou@gmail.com>,
	gcc-patches@gcc.gnu.org, kito.cheng@gmail.com,
	 palmer@dabbelt.com, andrew@sifive.com,
	 Sinan Lin <linsinan.lsn@linux.alibaba.com>
Subject: Re: [PATCH] RISC-V: avoid splitting small constant in <or_optab>i<mode>_extrabit pattern
Date: Mon, 10 Apr 2023 22:59:48 +0200	[thread overview]
Message-ID: <CAAeLtUAH6u6SeZk0F4GH-UFZeZDfEqyZfi5pQ3EHAMAWeToOcg@mail.gmail.com> (raw)
In-Reply-To: <88a0ea4e-7d5d-13c2-b73c-87fc35f682bb@gmail.com>

On Mon, 10 Apr 2023 at 17:57, Jeff Law <jeffreyalaw@gmail.com> wrote:
>
>
>
> On 4/9/23 23:07, Lin Sinan via Gcc-patches wrote:
> > From: Sinan Lin <linsinan.lsn@linux.alibaba.com>
> >
> > there is no need to split an xori/ori with an small constant. take the test
> > case `int foo(int idx) { return idx|3; }` as an example,
> >
> > rv64im_zba generates:
> >          ori     a0,a0,3
> >          ret
> > but, rv64im_zba_zbs generates:
> >          ori     a0,a0,1
> >          ori     a0,a0,2
> >          ret
> >
> > with this change, insn `ori r2,r1,3` will not be splitted in zbs.
> > ---
> >   gcc/config/riscv/predicates.md                     |  2 +-
> >   .../gcc.target/riscv/zbs-extra-bit-or-twobits.c    | 14 ++++++++++++++
> >   2 files changed, 15 insertions(+), 1 deletion(-)
> >   create mode 100644 gcc/testsuite/gcc.target/riscv/zbs-extra-bit-or-twobits.c
> A minor oversight in the VRULL patches in this space.  This is actually
> a regression as we were previously generating the single [xo]ri.

Thanks for catching this one!

I looked this change over and it looks fine.  I hope this is the last
fallout from this set of changes.

>
> The patch looks fine, though it does need to go through a test cycle.
>
> jeff
>

  reply	other threads:[~2023-04-10 21:00 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-04-10  5:07 Lin Sinan
2023-04-10 15:57 ` Jeff Law
2023-04-10 20:59   ` Philipp Tomsich [this message]
2023-04-11 16:19     ` Jeff Law
2023-04-11 16:28 ` 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=CAAeLtUAH6u6SeZk0F4GH-UFZeZDfEqyZfi5pQ3EHAMAWeToOcg@mail.gmail.com \
    --to=philipp.tomsich@vrull.eu \
    --cc=andrew@sifive.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=jeffreyalaw@gmail.com \
    --cc=kito.cheng@gmail.com \
    --cc=linsinan.lsn@linux.alibaba.com \
    --cc=mynameisxiaou@gmail.com \
    --cc=palmer@dabbelt.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).