RFR: JDK-8210858: AArch64: remove Math.log intrinsic [v2]
Aleksey Shipilev
shade at openjdk.org
Mon Jan 22 10:02:29 UTC 2024
On Thu, 18 Jan 2024 14:44:25 GMT, Tobias Holenstein <tholenstein at openjdk.org> wrote:
>> [JDK-8215133](https://bugs.openjdk.org/browse/JDK-8215133) disabled vmIntrinsics::_dlog. Remove it now
>>
>> ### Why remove
>>
>> That Java specification says:
>>
>> "The computed result must be within 1 ulp of the exact result. Results must be semi-monotonic... whenever the mathematical function is non-decreasing, so is the floating-point approximation, likewise, whenever the mathematical function is non-increasing, so is the floating-point approximation"
>>
>> There is no proof of the monotonicity of this intrinsics at the moment.
>
> Tobias Holenstein has updated the pull request incrementally with one additional commit since the last revision:
>
> remove MacroAssembler::fast_log() and generate_dlog()
Looks good, with nits.
Separately, I do wonder if [JDK-8301202](https://bugs.openjdk.org/browse/JDK-8301202) gives us a reason to avoid even calling to runtime, and instead just stay in Java completely.
src/hotspot/cpu/aarch64/c1_LIRGenerator_aarch64.cpp line 834:
> 832: break;
> 833: case vmIntrinsics::_dlog:
> 834: assert(StubRoutines::dlog() == nullptr, "no Math.log intrinsic on AArch64");
Is there a reason to assert this? I think the comment should be enough. And it could be richer as well, something like:
// Math.log intrinsic is not implemented on AArch64 (see JDK-8210858),
// but we can still call the shared runtime.
-------------
Marked as reviewed by shade (Reviewer).
PR Review: https://git.openjdk.org/jdk/pull/17480#pullrequestreview-1836070235
PR Review Comment: https://git.openjdk.org/jdk/pull/17480#discussion_r1461597211
More information about the hotspot-compiler-dev
mailing list