RFR: 8320995: RISC-V: C2 PopCountVI [v3]

Fei Yang fyang at openjdk.org
Tue May 7 14:22:54 UTC 2024


On Tue, 7 May 2024 13:36:08 GMT, Hamlin Li <mli at openjdk.org> wrote:

>> Hi,
>> Can you help to review this patch?
>> Both auto-vect and vector api depends on this intrinsic.
>> Thanks!
>> 
>> ## Performance
>> Not performance test was done, as this depends on vcpop.v instruction in zvbb extension and the code seqeunce is rather simple than non-intrinsic version.
>
> Hamlin Li has updated the pull request incrementally with one additional commit since the last revision:
> 
>   mark UseZvbb experimenal

src/hotspot/cpu/riscv/riscv_v.ad line 3795:

> 3793: instruct vpopcount_mask(vReg dst_src, vRegMask_V0 v0) %{
> 3794:   match(Set dst_src (PopCountVI dst_src v0));
> 3795:   match(Set dst_src (PopCountVL dst_src v0));

Is there a reason to force input & output being the same vector register?

src/hotspot/os_cpu/linux_riscv/riscv_hwprobe.cpp line 180:

> 178:   if (is_set(RISCV_HWPROBE_KEY_IMA_EXT_0, RISCV_HWPROBE_EXT_ZVBB)) {
> 179:     VM_Version::ext_Zvbb.enable_feature();
> 180:   }

I don't think it's appropriate to auto-enable an experimental extension.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/19065#discussion_r1592566821
PR Review Comment: https://git.openjdk.org/jdk/pull/19065#discussion_r1592568545


More information about the hotspot-dev mailing list