RFR: 8302908: RISC-V: Support masked vector arithmetic instructions for Vector API [v14]
Dingli Zhang
dzhang at openjdk.org
Tue Apr 11 08:39:38 UTC 2023
On Tue, 11 Apr 2023 02:51:35 GMT, Fei Yang <fyang at openjdk.org> wrote:
>> Dingli Zhang has updated the pull request incrementally with one additional commit since the last revision:
>>
>> Remove unneeded combination nodes
>
> src/hotspot/cpu/riscv/riscv_v.ad line 2562:
>
>> 2560:
>> 2561: instruct vmaskcast_same_esize_rvv(vRegMask dst_src) %{
>> 2562: predicate(Matcher::vector_length_in_bytes(n) == Matcher::vector_length_in_bytes(n->in(1)));
>
> Can we add support for other cases for VectorMaskCast at the same time?
Each bit in the mask register in RVV always corresponds to an element, and there is no need to convert the width of the mask according to the type of vector element, as in aarch64.
So we just need to remove the predicate here and change the instruct name to make it match the logic, which is the same as x86 AVX512[1].
[1] https://github.com/openjdk/jdk/blob/cd7d53c88c27eedbe16020b88c2219708d170a1e/src/hotspot/cpu/x86/x86.ad#L8326-L8334
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/12682#discussion_r1162481559
More information about the hotspot-compiler-dev
mailing list