RFR: 8320999: RISC-V: C2 RotateLeftV [v2]
Fei Yang
fyang at openjdk.org
Fri May 24 12:17:10 UTC 2024
On Fri, 24 May 2024 11:39:20 GMT, Hamlin Li <mli at openjdk.org> wrote:
>> 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)`
Yeah. If that is the case, maybe we can save one vector register then?
I mean let `instruct vrotate_right_reg(vReg dst, vReg src, Reg shift)` match something like this:
`match(Set dst (RotateRightV src (Replicate shift)))`.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/19325#discussion_r1613386212
More information about the hotspot-compiler-dev
mailing list