RFR: 8318218: RISC-V: C2 CompressBits [v3]

Hamlin Li mli at openjdk.org
Wed Nov 8 09:18:19 UTC 2023


On Wed, 8 Nov 2023 06:09:59 GMT, Fei Yang <fyang at openjdk.org> wrote:

>> Hamlin Li has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   Match Op_CompressBits based on UseRVV only
>
> src/hotspot/cpu/riscv/riscv.ad line 1901:
> 
>> 1899: 
>> 1900:     case Op_EncodeISOArray:
>> 1901:       return UseRVV && SpecialEncodeISOArray;
> 
> Seems that we can remove this extra check for `SpecialEncodeISOArray` (and related code at [1]) and group those 5 cases (which return UseRVV) together. 
> 
> [1] https://github.com/openjdk/jdk/blob/master/src/hotspot/cpu/riscv/vm_version_riscv.cpp#L290-L292

I will do it in another pr later.

> src/hotspot/cpu/riscv/riscv_v.ad line 2909:
> 
>> 2907: 
>> 2908: instruct compressBitsL(iRegLNoSp dst, iRegL src, iRegL mask, iRegPNoSp tmp, vRegMask_V0 v0, vReg_V4 v4, vReg_V8 v8) %{
>> 2909:   predicate(UseRVV && (MaxVectorSize >= 16));
> 
> Same as above.

Yes, seems it's redundant to check it here again, as we already have a check in Matcher::match_rule_supported where it's necessary to avoid silent failure in case restrictions on MaxVectorSize is changed in the future.
It's removed here.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/16481#discussion_r1386247964
PR Review Comment: https://git.openjdk.org/jdk/pull/16481#discussion_r1386249473


More information about the hotspot-dev mailing list