RFR: 8329331: Intrinsify Unsafe::setMemory [v22]

Scott Gibbons sgibbons at openjdk.org
Fri Apr 19 20:13:06 UTC 2024


On Fri, 19 Apr 2024 17:42:36 GMT, Jorn Vernee <jvernee at 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


More information about the hotspot-compiler-dev mailing list