RFR: 8349452: Fix performance regression for Arrays.fill() with AVX512 [v2]
Srinivas Vamsi Parasa
sparasa at openjdk.org
Fri Nov 21 23:57:13 UTC 2025
On Fri, 21 Nov 2025 21:56:13 GMT, Sandhya Viswanathan <sviswanathan at openjdk.org> wrote:
>> Srinivas Vamsi Parasa has updated the pull request incrementally with one additional commit since the last revision:
>>
>> undo size check for fill64_masked
>
> src/hotspot/cpu/x86/macroAssembler_x86.cpp line 9245:
>
>> 9243: }
>> 9244:
>> 9245: void MacroAssembler::fill32_unmasked(uint shift, Register dst, int disp, XMMRegister xmm,
>
> This could be called as fill32_tail. Also good to replace overall fill32_masked with fill32_tail.
Please see this suggestion incorporated in the updated code.
> src/hotspot/cpu/x86/macroAssembler_x86.cpp line 9305:
>
>> 9303: }
>> 9304:
>> 9305: void MacroAssembler::fill64_unmasked(uint shift, Register dst, int disp,
>
> This could be called as fill64_tail. Also good to replace overall fill64_masked with fill64_tail.
Please see this suggestion incorporated in the updated code.
> src/hotspot/cpu/x86/macroAssembler_x86.cpp line 9362:
>
>> 9360: jcc(Assembler::greater, L_fill_64_bytes);
>> 9361: fill32_unmasked(shift, to, 0, xtmp, count, rtmp);
>> 9362: jmp(L_exit);
>
> Instead of repeating fill32_unmasked multiple time, you could jmp to say L_fill_32_tail and have the fill32_unmasked code there one time.
Please see this suggestion incorporated in the updated code.
> src/hotspot/cpu/x86/macroAssembler_x86.cpp line 9383:
>
>> 9381: fill64(to, 0, xtmp);
>> 9382: subq(count, 64 >> shift);
>> 9383: fill32_unmasked(shift, to, 64, xtmp, count, rtmp);
>
> Instead of repeating fill64_unmasked multiple time, you could jmp to say L_fill_64_tail and have the fill64_unmasked code there one time.
Please see this suggestion incorporated in the updated code.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/28442#discussion_r2551288005
PR Review Comment: https://git.openjdk.org/jdk/pull/28442#discussion_r2551288279
PR Review Comment: https://git.openjdk.org/jdk/pull/28442#discussion_r2551289093
PR Review Comment: https://git.openjdk.org/jdk/pull/28442#discussion_r2551289710
More information about the hotspot-dev
mailing list