[jdk18] RFR: 8278508: Enable X86 maskAll instruction pattern for 32 bit JVM. [v3]

Sandhya Viswanathan sviswanathan at openjdk.java.net
Tue Dec 21 17:30:22 UTC 2021


On Tue, 21 Dec 2021 16:28:53 GMT, Jatin Bhateja <jbhateja at openjdk.org> wrote:

>> - Vector.maskAll was accelerated for AVX-512 target, but  x86 existing backend implementation does not enable maskAll instruction patterns for 32 bit JVM, due to which operations fall backs over replicateB operation which broadcasts the mask value in a vector.
>> - In some cases after unboxing-boxing optimization this vector eventually reaches to XorVMask which has different operands one held in opmask register and other in vector.
>> 
>> Kindly review and share your feedback.
>> 
>> Best Regards,
>> Jatin
>
> Jatin Bhateja has updated the pull request incrementally with one additional commit since the last revision:
> 
>   8278508: Review comments resolved.

src/hotspot/cpu/x86/c2_MacroAssembler_x86.cpp line 4283:

> 4281:       if (mask_len != 64) {
> 4282:         kshiftrql(dst, dst, 64 - mask_len);
> 4283:       }

We are only supporting vector lengths of power of 2 for x86 (8,16,32,64) for byte vector.  The only case that comes here is mask_len == 64.

src/hotspot/cpu/x86/c2_MacroAssembler_x86.cpp line 4304:

> 4302:   kmovdl(tmp, src);
> 4303:   kunpckdql(dst, tmp, tmp);
> 4304:   kshiftrql(dst, dst, 64 - mask_len);

We are only supporting vector lengths of power of 2 for x86 (8,16,32,64) for byte vector. The only case that comes here is mask_len == 64 so we dont need kshiftrql.

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

PR: https://git.openjdk.java.net/jdk18/pull/24


More information about the hotspot-compiler-dev mailing list