From: "juzhe.zhong@rivai.ai" <juzhe.zhong@rivai.ai>
To: jeffreyalaw <jeffreyalaw@gmail.com>,
"Robin Dapp" <rdapp.gcc@gmail.com>,
gcc-patches <gcc-patches@gcc.gnu.org>,
palmer <palmer@dabbelt.com>, kito.cheng <kito.cheng@gmail.com>
Subject: Re: Re: [PATCH] RISC-V: Implement vec_set and vec_extract.
Date: Tue, 13 Jun 2023 14:49:04 +0800 [thread overview]
Message-ID: <745DF945A86C1AB2+2023061314490425980014@rivai.ai> (raw)
In-Reply-To: <fb444ad9-4b51-5222-54dd-ed57bb22df44@gmail.com>
[-- Attachment #1: Type: text/plain, Size: 1618 bytes --]
I suggest we implement vector calling convention even though it is not ratified yet.
We can allow calling convention to be enabled only when --param=riscv-autovec-preference=fixed-vlmax.
We have such issue:
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110119
if we don't have calling convention for fixed-vlmax.
juzhe.zhong@rivai.ai
From: Jeff Law
Date: 2023-06-13 03:16
To: Robin Dapp; gcc-patches; palmer; Kito Cheng; juzhe.zhong@rivai.ai
Subject: Re: [PATCH] RISC-V: Implement vec_set and vec_extract.
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
next prev parent reply other threads:[~2023-06-13 6:49 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
2023-06-13 6:49 ` juzhe.zhong [this message]
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=745DF945A86C1AB2+2023061314490425980014@rivai.ai \
--to=juzhe.zhong@rivai.ai \
--cc=gcc-patches@gcc.gnu.org \
--cc=jeffreyalaw@gmail.com \
--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).