public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Jeff Law <jeffreyalaw@gmail.com>
To: Lin Sinan <mynameisxiaou@gmail.com>, gcc-patches@gcc.gnu.org
Cc: philipp.tomsich@vrull.eu, 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: Tue, 11 Apr 2023 10:28:20 -0600	[thread overview]
Message-ID: <80cd2602-c6e5-da6a-cdd9-0b8ce81b1668@gmail.com> (raw)
In-Reply-To: <20230410050701.10254-1-mynameisxiaou@gmail.com>



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.
As noted, this was actually a regression.  I've bootstrapped this change 
on rv64 with no regressions and pushed it to the trunk.

Thanks!

jeff

      parent reply	other threads:[~2023-04-11 16:28 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
2023-04-11 16:19     ` Jeff Law
2023-04-11 16:28 ` Jeff Law [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=80cd2602-c6e5-da6a-cdd9-0b8ce81b1668@gmail.com \
    --to=jeffreyalaw@gmail.com \
    --cc=andrew@sifive.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=kito.cheng@gmail.com \
    --cc=linsinan.lsn@linux.alibaba.com \
    --cc=mynameisxiaou@gmail.com \
    --cc=palmer@dabbelt.com \
    --cc=philipp.tomsich@vrull.eu \
    /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).