RFR: 8252847: Optimize primitive arrayCopy stubs using AVX-512 masked instructions [v5]

Vladimir Kozlov kvn at openjdk.java.net
Fri Sep 25 21:08:50 UTC 2020


On Thu, 17 Sep 2020 05:17:38 GMT, Jatin Bhateja <jbhateja at openjdk.org> wrote:

>> src/hotspot/cpu/x86/macroAssembler_x86.cpp line 7971:
>> 
>>> 7969:                                        BasicType type, int offset, bool use64byteVector) {
>>> 7970:   assert(MaxVectorSize >= 32, "vector length < 32");
>>> 7971:   use64byteVector |= MaxVectorSize > 32 && AVX3Threshold == 0;
>> 
>> When do you expect AVX3Threshold to be 0?
>
> As of now when user explicitly pass -XX:AVX3Threshold=0 , default value of AVX3Threshold is 4096.

I don't like that you put special meaning on AVX3Threshold=0 and then have to add additional checks for it in places
where you check its power of 2. And you don't check such setting in new tests.

Actually checking for 0 and power of 2 should be done by flag's constraint. See CodeEntryAlignmentConstraintFunc as
example.

There is also this strange relation with MaxVectorSize. Also we should consider power level switch for 64 bytes AVX3
vectors. Does it make sense to use it if array length is small (< 4096 default)?

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

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


More information about the core-libs-dev mailing list