RFR: 8320999: RISC-V: C2 RotateLeftV [v2]

Fei Yang fyang at openjdk.org
Fri May 24 07:44:08 UTC 2024


On Wed, 22 May 2024 18:03:19 GMT, Hamlin Li <mli at openjdk.org> wrote:

>> Hi,
>> Can you help to review this patch?
>> More detailed description is inline in the code.
>> Thanks
>
> Hamlin Li has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains 12 commits:
> 
>  - merge
>  - Fix imm6 in vror.vi; misc
>  - Merge branch 'master' into rotate-left-right-v
>  - add comments
>  - fix mask
>  - fix imm & long
>  - fixes
>  - Merge branch 'master' into rotate-left-right-v
>  - fixes
>  - remove redundant code: UseZvbb
>  - ... and 2 more: https://git.openjdk.org/jdk/compare/a0c5714d...edd0201d

Hi, I have two comments after a cursory look. Thanks.

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

> 3095: %}
> 3096: 
> 3097: instruct vrotate_right_imm(vReg dst, vReg src, immI shift) %{

Question: Could we make use of the vector-scalar rotate variants (vrol_vx / vror_vx) in case `shift` is not a constant?

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

> 3099:             Matcher::vector_element_basic_type(n) == T_SHORT ||
> 3100:             Matcher::vector_element_basic_type(n) == T_INT ||
> 3101:             Matcher::vector_element_basic_type(n) == T_LONG);

I am not sure but do we really need this predicate?

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

PR Review: https://git.openjdk.org/jdk/pull/19325#pullrequestreview-2076099453
PR Review Comment: https://git.openjdk.org/jdk/pull/19325#discussion_r1613007020
PR Review Comment: https://git.openjdk.org/jdk/pull/19325#discussion_r1613007940


More information about the hotspot-compiler-dev mailing list