RFR: 8320999: RISC-V: C2 RotateLeftV [v2]
Hamlin Li
mli at openjdk.org
Fri May 24 11:43:05 UTC 2024
On Fri, 24 May 2024 07:39:08 GMT, Fei Yang <fyang at openjdk.org> wrote:
>> 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
>
> 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?
Do you mean have another instruct like `instruct vrotate_right_imm(vReg dst, vReg src, Reg shift)`?
Seems not, as in both vectorization or Vector API implementation, when it's not const, it will be put into a vector first, then match `vrotate_right(vReg dst, vReg src, vReg shift)`
> 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?
That's a piece of code need to be cleaned. Thanks for catching.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/19325#discussion_r1613333361
PR Review Comment: https://git.openjdk.org/jdk/pull/19325#discussion_r1613334409
More information about the hotspot-compiler-dev
mailing list