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.zh...@rivai.ai
 
From: Jeff Law
Date: 2023-06-13 03:16
To: Robin Dapp; gcc-patches; palmer; Kito Cheng; juzhe.zh...@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
 

Reply via email to