On Fri, 19 Apr 2024 17:42:36 GMT, Jorn Vernee <jver...@openjdk.org> wrote:

>> Scott Gibbons has updated the pull request incrementally with one additional 
>> commit since the last revision:
>> 
>>   Address review comments; update copyright years
>
> src/hotspot/cpu/x86/stubGenerator_x86_64_arraycopy.cpp line 2523:
> 
>> 2521:   // Number of (8*X)-byte chunks into rScratch1
>> 2522:   __ movq(tmp, size);
>> 2523:   __ shrq(tmp, 3);
> 
> `shr` [sets the zero flag][1], so I think you can just move the jump to after 
> the shift and avoid a separate comparison
> 
> ```suggestion  
>   // Number of (8*X)-byte chunks into rScratch1
>   __ movq(tmp, size);
>   __ shrq(tmp, 3);
>   __ jccb(Assembler::zero, L_Tail);
> 
> 
> [1]: https://www.felixcloutier.com/x86/sal:sar:shl:shr#flags-affected

Good catch.  Done.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/18555#discussion_r1572794443

Reply via email to