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

Hamlin Li mli at openjdk.org
Wed May 22 18:07:05 UTC 2024


On Wed, 22 May 2024 14:15:39 GMT, Ludovic Henry <luhenry 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/assembler_riscv.hpp line 1887:
> 
>> 1885: 
>> 1886:   // Vector Bit-manipulation used in Cryptography (Zvbb) Extension
>> 1887:   INSN(vrol_vx,    0b1010111, 0b100, 0b010101);
> 
> we are not using `vrol_vx` anywhere.

thanks for catching, removed.

> src/hotspot/cpu/riscv/assembler_riscv.hpp line 1899:
> 
>> 1897: 
>> 1898:   // Vector Bit-manipulation used in Cryptography (Zvbb) Extension
>> 1899:   INSN(vror_vi,    0b1010111, 0b011, 0b010100);
> 
> I'm assuming there is not `vrol_vi`? It would be worth leaving a small comment here like
> 
> // There is no `vrol_vi` instruction.

yes, it makes sense to do so.

> src/hotspot/cpu/riscv/matcher_riscv.hpp line 132:
> 
>> 130:   // Does the CPU supports vector variable shift instructions?
>> 131:   static constexpr bool supports_vector_variable_shifts(void) {
>> 132:     return true;
> 
> What's the path to checking for `UseZvbb` and `UseZvbc` respectively to the specific instruction?

Here, the 3 checks are not independent, they depend on other checks in both vectorization and vector API, so returning true is fine.

But in order to eliminate everyone’s doubts in the future, I change them return UseZvbb.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/19325#discussion_r1610429116
PR Review Comment: https://git.openjdk.org/jdk/pull/19325#discussion_r1610428809
PR Review Comment: https://git.openjdk.org/jdk/pull/19325#discussion_r1610430351


More information about the hotspot-compiler-dev mailing list