RFR: 8284813: x86 Code cleanup related to move instructions. [v2]

Jatin Bhateja jbhateja at openjdk.java.net
Wed May 4 19:04:12 UTC 2022


On Tue, 3 May 2022 22:36:07 GMT, Sandhya Viswanathan <sviswanathan at openjdk.org> wrote:

>> Jatin Bhateja has updated the pull request with a new target base due to a merge or a rebase. The incremental webrev excludes the unrelated changes brought in by the merge/rebase. The pull request contains two additional commits since the last revision:
>> 
>>  - Merge branch 'master' of http://github.com/openjdk/jdk into JDK-8284813
>>  - 8284813: x86 Code cleanup related to move instructions.
>
> src/hotspot/cpu/x86/assembler_x86.cpp line 3032:
> 
>> 3030:     attributes.reset_is_clear_context();
>> 3031:   }
>> 3032:   int encode = vex_prefix_and_encode(dst->encoding(), 0, src->encoding(), VEX_SIMD_F2, VEX_OPCODE_0F, &attributes);
> 
> The existing version (with no mask) was using VEX_SIMD_F2 or VEX_SIMD_F3 based on  avx512bw supported or not. With this change now the calling place need to be fixed. One place I see this being used is loadIotaIndices(). Please fix loadIotaIndices to use appropriate instruction for the platform. Is there any other place in array copy/clear?

vector load operations in load_iota_indices are sensitive to vector length, a 64 byte iota values are loaded only for ByteVector.SPECIES_512 which necessitates existence of AVX512BW feature, I re-checked that copy/fill kernels  use appropriate instructions.

> src/hotspot/cpu/x86/macroAssembler_x86_arrayCopy_avx3.cpp line 217:
> 
>> 215:   bzhiq(temp, temp, length);
>> 216:   kmovql(mask, temp);
>> 217:   evmovdqu(type[shift], mask, xmm, Address(src, index, scale, offset), true, Assembler::AVX_256bit);
> 
> Should the merge parameter be set to false for load here?

DONE.

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

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


More information about the hotspot-compiler-dev mailing list