RFR: 8284813: x86 Code cleanup related to move instructions. [v2]
Sandhya Viswanathan
sviswanathan at openjdk.java.net
Tue May 3 22:39:52 UTC 2022
On Fri, 29 Apr 2022 05:10:44 GMT, Jatin Bhateja <jbhateja at openjdk.org> wrote:
>> Summary of changes:
>>
>> - Correct feature checks in some assembler move instruction.
>> - Explicitly pass opmask register in routines accepting merge argument.
>> - Code re-organization related to move instruction, pull out the merge argument up to instruction pattern or top level caller.
>> - Add missing encoding based move elision checks in some macro assembly routines.
>>
>> Kindly review and share your feedback.
>>
>> Regards,
>> Jatin
>
> 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?
src/hotspot/cpu/x86/macroAssembler_x86_arrayCopy_avx3.cpp line 202:
> 200: bzhiq(temp, temp, length);
> 201: kmovql(mask, temp);
> 202: evmovdqu(type[shift], mask, xmm, Address(src, index, scale, offset), true, Assembler::AVX_512bit);
Should the merge parameter be set to false for load here?
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?
-------------
PR: https://git.openjdk.java.net/jdk/pull/8230
More information about the hotspot-compiler-dev
mailing list