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

Ningsheng Jian njian at openjdk.java.net
Tue Dec 7 02:36:11 UTC 2021


On Mon, 29 Nov 2021 09:40:23 GMT, Eric Liu <eliu 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?

src/hotspot/cpu/aarch64/aarch64_sve_ad.m4 line 3179:

> 3177: %}
> 3178: 
> 3179: instruct vmask_tolong(iRegLNoSp dst, pReg src, vReg vtmp1, vReg vtmp2, pRegGov pgtmp, iRegL tmp, rFlagsReg cr) %{

And this iRegL

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

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


More information about the hotspot-compiler-dev mailing list