JDK-8324303 : RISC-V: re-visit NaN related intrinsics for performance consideration
  • Type: Enhancement
  • Component: hotspot
  • Sub-Component: compiler
  • Affected Version: 23
  • Priority: P4
  • Status: Open
  • Resolution: Unresolved
  • Submitted: 2024-01-22
  • Updated: 2024-01-22
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
Other
tbdUnresolved
Related Reports
Relates :  
Relates :  
Description
As discussed in [1] [2], in java spec, there is no restrictions on how an NaN output should be based on the input NaN. That means an implementation can return any NaN and does not need to preserve payloads in the input NaN.
Till now, riscv intrinsics treat NaN specially and process them in a branch, which impacts the performance. It's worth to re-visit all the NaN related intrinsics on riscv, to check if it's necessary and maybe re-implement intrinsics and related tests. 

[1] https://github.com/openjdk/jdk/pull/17450#pullrequestreview-1828999418
[2] https://mail.openjdk.org/pipermail/riscv-port-dev/2022-December/000706.html