RFR: 8320999: RISC-V: C2 RotateLeftV [v2]
Hamlin Li
mli at openjdk.org
Fri May 24 13:20:02 UTC 2024
On Fri, 24 May 2024 12:14:44 GMT, Fei Yang <fyang at openjdk.org> wrote:
>> 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)))`.
Not sure, could be. If this is the case, then the vecotr shift should be optimized too?
I check the code generated, seems we're fine?
0x00002aaac560c55a: vmv.v.x v1,a3
... ...
0x00002aaac560c594: vle32.v v2,(a4)
0x00002aaac560c598: vsetivli t0,8,e32,m1,tu,mu
0x00002aaac560c59c: vror.vv v2,v2,v1
In any way, we need 2 v register's?
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/19325#discussion_r1613469134
More information about the hotspot-compiler-dev
mailing list