Re: [PATCH] RISC-V: Implement vec_set and vec_extract.

2023-06-13 Thread Jeff Law via Gcc-patches
On 6/13/23 00:50, Robin Dapp wrote: 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:

Re: [PATCH] RISC-V: Implement vec_set and vec_extract.

2023-06-13 Thread Robin Dapp via Gcc-patches
> 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 >

Re: Re: [PATCH] RISC-V: Implement vec_set and vec_extract.

2023-06-13 Thread juzhe.zh...@rivai.ai
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 th

Re: [PATCH] RISC-V: Implement vec_set and vec_extract.

2023-06-12 Thread Jeff Law via Gcc-patches
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

Re: [PATCH] RISC-V: Implement vec_set and vec_extract.

2023-06-12 Thread Robin Dapp via Gcc-patches
> +  /* If the slide offset fits into 5 bits we can > + use the immediate variant instead of the register variant. > + The expander's operand[2] is ops[3] here. */ > +  if (!satisfies_constraint_K (ops[3])) > +    ops[3] = force_reg (Pmode, ops[3]); > > I don't think we need this.

Re: [PATCH] RISC-V: Implement vec_set and vec_extract.

2023-06-12 Thread 钟居哲
should be able to handle this. juzhe.zh...@rivai.ai From: Robin Dapp Date: 2023-06-12 22:55 To: gcc-patches; palmer; Kito Cheng; juzhe.zh...@rivai.ai; jeffreyalaw CC: rdapp.gcc Subject: [PATCH] RISC-V: Implement vec_set and vec_extract. Hi, this implements the vec_set and vec_extract patterns

[PATCH] RISC-V: Implement vec_set and vec_extract.

2023-06-12 Thread Robin Dapp via Gcc-patches
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