RFR: 8331577: RISC-V: C2 CountLeadingZerosV [v2]

Hamlin Li mli at openjdk.org
Thu May 9 12:02:56 UTC 2024


On Thu, 9 May 2024 11:24:47 GMT, Fei Yang <fyang at openjdk.org> wrote:

> > NOTE: the reason why let dst and src share one register (i.e. `(vReg dst_src, vRegMask_V0 v0)`) in masked version is that for inactive elements, we should keep the origin value, neither `mu` or `ma` will do it.
> 
> Interesting. Is it specified anywhere?

For the Semantics of `mu` or `ma`, it's https://github.com/riscv/riscv-v-spec/blob/master/v-spec.adoc#343-vector-tail-agnostic-and-vector-mask-agnostic-vta-and-vma. Based on this, we can deduce that here is a hidden bug.

> 
> > BTW, I will also re-visit all existing masked version instructions to make sure it works as expected. tracked by https://bugs.openjdk.org/browse/JDK-8331992
> 
> I think this issue was considered before when we were adding support for vector api. What about the recently added ones like ReverseBytesV, PopCountVI/L?

Yeh, I'm testing with a fix including those 2 intrinsics.

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

PR Comment: https://git.openjdk.org/jdk/pull/19153#issuecomment-2102527828


More information about the hotspot-compiler-dev mailing list