RFR: 8276985: AArch64: [vectorapi] Backend support of VectorMaskToLongNode

Andrew Haley aph at openjdk.java.net
Tue Dec 7 10:15:17 UTC 2021


On Tue, 7 Dec 2021 02:30:32 GMT, Ningsheng Jian <njian at openjdk.org> wrote:

>> The lack of codegen for VectorMaskToLong results in a regression on
>> AArch64 for VectorMask.laneIsSet, which relies on the intrinsification
>> of VectorMask.toLong after JDK-8273949.
>> 
>> This patch implements bitmask extraction on AArch64 for NEON and SVE by
>> using scalar instructions, which is equivalent to the PMOVMSK
>> instructions on X86. The performance of VectorMask.laneIsSet improves
>> about 10x for NEON and 2x~4x for SVE on my test machines.
>
> src/hotspot/cpu/aarch64/aarch64_neon_ad.m4 line 2499:
> 
>> 2497: %}
>> 2498: 
>> 2499: instruct vmask_tolong16B(iRegLNoSp dst, vecX src, iRegL tmp) %{
> 
> "iRegL tmp" should be "iRegLNoSp tmp" or use rscratch directly?

Yes, good catch. This kind of bug is horrible to detect.

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

PR: https://git.openjdk.java.net/jdk/pull/6585


More information about the hotspot-compiler-dev mailing list