[jdk17u-dev] RFR: 8290322: Optimize Vector.rearrange over byte vectors for AVX512BW targets. [v2]

Sandhya Viswanathan sviswanathan at openjdk.org
Tue Nov 29 00:06:32 UTC 2022


On Thu, 24 Nov 2022 16:49:52 GMT, Jatin Bhateja <jbhateja at openjdk.org> wrote:

>> Clean backport of [JDK-8290322](https://bugs.openjdk.org/browse/JDK-8290322), due to merge conflicts original patch could not be applied directly by bot.
>> 
>> Patch enables wide vector byte level permutation for AVX512BW targets and benefits multiple generations of Intel's Xeon servers (SKX, CLX, CPX) prior to Ice lake which provides a direct HW instruction (VPERMB). JIT instruction sequence emitted in this case is specific to Vector.rearrange API, hence the scope of the patch is limited to VectorAPIs which is an incubating module currently.
>> 
>> Vector API jtreg test suite contains multiple tests cases for ByteVector.SPECIES_512 to extensively tests the patch.
>> 
>> Original patch review was done with [PR 9498](https://github.com/openjdk/jdk/pull/9498)
>
> Jatin Bhateja has refreshed the contents of this pull request, and previous commits have been removed. The incremental views will show differences compared to the previous content of the PR. The pull request contains one new commit since the last revision:
> 
>   Backport 38a81913d33c856d64b7c26f934026815a482e43

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

> 3872: void C2_MacroAssembler::rearrange_bytes(XMMRegister dst, XMMRegister shuffle, XMMRegister src, XMMRegister xtmp1,
> 3873:                                         XMMRegister xtmp2, XMMRegister xtmp3, Register rtmp, KRegister ktmp,
> 3874:                                         int vlen_enc) {

This is the last method in the file in the original commit (https://github.com/openjdk/jdk/commit/38a81913d33c856d64b7c26f934026815a482e43) as well as jdk mainline tip.

src/hotspot/cpu/x86/c2_MacroAssembler_x86.hpp line 278:

> 276: 
> 277:   void rearrange_bytes(XMMRegister dst, XMMRegister shuffle, XMMRegister src, XMMRegister xtmp1,
> 278:                        XMMRegister xtmp2, XMMRegister xtmp3, Register rtmp, KRegister ktmp, int vlen_enc);

There is a blank line between rerrange_bytes and endif in the original commit as well as jdk mainline tip.

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

PR: https://git.openjdk.org/jdk17u-dev/pull/917


More information about the jdk-updates-dev mailing list