On Mon, 2 Nov 2026 12:12:51 GMT, April Ivy <[email protected]> wrote:

>> Larry has updated the pull request incrementally with one additional commit 
>> since the last revision:
>> 
>>   8394260: Address Adler32 AVX2 review comments
>>   
>>   Use an unsigned 32-bit type for the division magic constant and update the 
>> LIMIT overflow comment to refer to the unsigned 32-bit range.
>>   
>>   Add an AVX2-specific jtreg run using all-0xFF input around LIMIT.
>
> src/hotspot/cpu/x86/stubGenerator_x86_64_adler.cpp line 305:
> 
>> 303:   __ vpaddd(yb, yb, ydata0, Assembler::AVX_256bit);
>> 304:   __ vpaddd(yb_0, yb_0, ydata1, Assembler::AVX_256bit);
>> 305:   __ vmovdqu(yprev_a, ya);
> 
> `yprev_a` is always `ya` at the top of the loop, so adding `ya` to `ysum_a` 
> before updating `ya` drops the register and this copy. Same at L327.

done;

> src/hotspot/cpu/x86/stubGenerator_x86_64_adler.cpp line 306:
> 
>> 304:   __ vpaddd(yb_0, yb_0, ydata1, Assembler::AVX_256bit);
>> 305:   __ vmovdqu(yprev_a, ya);
>> 306:   __ jmp(SLOOP1A_AVX2);
> 
> Two branches per iteration. Testing `s` once before the loop and ending with 
> `jcc(aboveEqual, SLOOP1A_AVX2)` here drops the `jmp`.

done;

> src/hotspot/cpu/x86/stubGenerator_x86_64_adler.cpp line 350:
> 
>> 348:   __ movdl(b_d, xb);
>> 349: 
>> 350:   __ movl(rax, a_d);
> 
> This sequence appears four times now (also L356, L409, L415). A small lambda 
> would cover them.

done;

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

PR Review Comment: https://git.openjdk.org/jdk/pull/33338#discussion_r4451616515
PR Review Comment: https://git.openjdk.org/jdk/pull/33338#discussion_r4451617256
PR Review Comment: https://git.openjdk.org/jdk/pull/33338#discussion_r4451617970

Reply via email to