RFR: 8321014: RISC-V: C2 VectorLoadShuffle [v3]

Fei Yang fyang at openjdk.org
Tue Apr 23 01:51:37 UTC 2024


On Mon, 22 Apr 2024 14:45:45 GMT, Hamlin Li <mli at openjdk.org> wrote:

>> Hi,
>> Can you help to review the patch for instrinsic VectorLoadShuffle?
>> 
>> BTW, without this intrinsic, some other vector api operation does not work as well (e.g. rearrange) on riscv.
>> 
>> Thanks
>> 
>> ## Test
>> test/jdk/jdk/incubator/vector/
>> test/hotspot/jtreg/compiler/vectorapi
>
> Hamlin Li has updated the pull request with a new target base due to a merge or a rebase. The incremental webrev excludes the unrelated changes brought in by the merge/rebase. The pull request contains four additional commits since the last revision:
> 
>  - refine code
>  - Merge branch 'master' into vector-load-shuffle
>  - add comment
>  - Initial commit

Thanks for the quick update! One more question remain. Otherwise looks good.

src/hotspot/cpu/riscv/riscv_v.ad line 81:

> 79:       case Op_VectorLoadShuffle:
> 80:       case Op_VectorRearrange:
> 81:         // vlen >= 4 is required, because min vector size for byte is 4 on riscv,

I was not aware of such a constraint before. Is this a constraint at the ISA level or is a performance consideration? I didn't find where it is mentioned in the RVV spec.

-------------

PR Review: https://git.openjdk.org/jdk/pull/18835#pullrequestreview-2016090731
PR Review Comment: https://git.openjdk.org/jdk/pull/18835#discussion_r1575541543


More information about the hotspot-compiler-dev mailing list