public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Jeff Law <jeffreyalaw@gmail.com>
To: Kito Cheng <kito.cheng@gmail.com>,
	Jivan Hakobyan <jivanhakobyan9@gmail.com>
Cc: gcc-patches@gcc.gnu.org
Subject: Re: RISC-V: Replace unspec with bitreverse in riscv_brev8_<mode> insn
Date: Wed, 26 Jul 2023 10:23:41 -0600	[thread overview]
Message-ID: <e6c67b0d-d692-ec09-4389-95b4c66a849b@gmail.com> (raw)
In-Reply-To: <CA+yXCZCwW70rOYucYKEDw8Y22AGkEc4rFVRCwX=LwUXEQui=5Q@mail.gmail.com>



On 7/26/23 02:21, Kito Cheng via Gcc-patches wrote:
> My understanding is the semantic is slightly different, brev8 is only
> the bit reverse within each byte, but bitreverse means did bit reverse
> for the whole content of the mode, e.g. riscv_brev8_si will bit
> reserved within 32 bit.
> 
> Using RV32 as example:
> UNSPEC_BREV8:
> rd[0...7]  = rs[7...0]
> rd[8...15]  = rs[15...8]
> rd[16...23]  = rs[23...16]
> rd[16...23]  = rs[31...24]
> 
> bitreverse:
> rd[0...31] = rs[31...0]
Yea, I think you're right Kito.  Goof on our side.

Jivan, I think this explains why it's not working for all of Mariam's 
cases -- odds are the cases where it is working are for the reversed crc8.

Let's drop this since it doesn't match the semantics of GCC's bitreverse.

Mariam's call on whether or not to utilize brev8 for the crc8 cases 
where it's likely faster than other sequences to reverse bits.

jeff

      reply	other threads:[~2023-07-26 16:23 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-07-26  7:54 Jivan Hakobyan
2023-07-26  8:21 ` Kito Cheng
2023-07-26 16:23   ` 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=e6c67b0d-d692-ec09-4389-95b4c66a849b@gmail.com \
    --to=jeffreyalaw@gmail.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=jivanhakobyan9@gmail.com \
    --cc=kito.cheng@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).