RFR: 8348638: Performance regression in Math.tanh [v2]

Mohamed Issa duke at openjdk.org
Fri Mar 28 00:56:23 UTC 2025


On Fri, 28 Mar 2025 00:15:59 GMT, Sandhya Viswanathan <sviswanathan at openjdk.org> wrote:

>> Mohamed Issa has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   Change tanh intrinsic endpoint comparison value to match reference OpenJDK implementation
>
> src/hotspot/cpu/x86/stubGenerator_x86_64_tanh.cpp line 332:
> 
>> 330:   __ andl(rcx, 32767);
>> 331:   __ cmpl(rcx, 16436);
>> 332:   __ jcc(Assembler::aboveEqual, L_2TAG_PACKET_2_0_1); // Branch only if |x| >= 20
> 
> It will be good to return +/- 1 when |x| >= 22 instead of 20 to match the Java code.

Yes, I made the change. Thanks.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/23889#discussion_r2017767369


More information about the hotspot-compiler-dev mailing list