public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Jeff Law <jeffreyalaw@gmail.com>
To: Robin Dapp <rdapp.gcc@gmail.com>,
	gcc-patches <gcc-patches@gcc.gnu.org>,
	palmer <palmer@dabbelt.com>, Kito Cheng <kito.cheng@gmail.com>,
	"juzhe.zhong@rivai.ai" <juzhe.zhong@rivai.ai>
Subject: Re: [PATCH] RISC-V: Implement vec_set and vec_extract.
Date: Mon, 12 Jun 2023 13:16:42 -0600	[thread overview]
Message-ID: <fb444ad9-4b51-5222-54dd-ed57bb22df44@gmail.com> (raw)
In-Reply-To: <fcd153fb-4e70-a772-14b1-730490e35611@gmail.com>



On 6/12/23 08:55, Robin Dapp wrote:
> Hi,
> 
> this implements the vec_set and vec_extract patterns for integer and
> floating-point data types.  For vec_set we broadcast the insert value to
> a vector register and then perform a vslideup with effective length 1 to
> the requested index.
> 
> vec_extract is done by sliding down the requested element to index 0
> and v(f)mv.[xf].s to a scalar register.
> 
> The patch does not include vector-vector extraction which
> will be done at a later time.
> 
> The vec_set tests required a vector calling convention/ABI because
> a vector is being returned.  I'm currently experimenting with adding
> preliminary vector ABI support locally and still finishing some tests
> after discussing with Juzhe.  Consequently, I would not push this
> before ABI support is upstream.
I'm not sure how fast the vector ABI stuff is going to move.  So I'd be 
a bit leery of tying this work to the ABI effort, particularly if it's 
just to test.

Could you use asms to force vec_set/vec_extract to cross register files?

Jeff

  parent reply	other threads:[~2023-06-12 19:16 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-06-12 14:55 Robin Dapp
2023-06-12 15:13 ` 钟居哲
2023-06-12 15:26   ` Robin Dapp
2023-06-12 19:16 ` Jeff Law [this message]
2023-06-13  6:49   ` juzhe.zhong
2023-06-13  6:50     ` Robin Dapp
2023-06-13 14:10       ` Jeff Law
2023-06-16 13:41   ` [PATCH v2] " Robin Dapp
2023-06-16 13:55     ` 钟居哲
2023-06-17  2:12       ` 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=fb444ad9-4b51-5222-54dd-ed57bb22df44@gmail.com \
    --to=jeffreyalaw@gmail.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=juzhe.zhong@rivai.ai \
    --cc=kito.cheng@gmail.com \
    --cc=palmer@dabbelt.com \
    --cc=rdapp.gcc@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).