JDK-8269879 : [PPC64] C2: Math.rint intrinsic uses wrong rounding mode
  • Type: Bug
  • Component: hotspot
  • Sub-Component: compiler
  • Affected Version: 16,17,18
  • Priority: P2
  • Status: Resolved
  • Resolution: Fixed
  • CPU: ppc
  • Submitted: 2021-07-05
  • Updated: 2021-07-15
  • Resolved: 2021-07-07
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.
JDK 17 JDK 18
17 b31Fixed 18Fixed
Related Reports
Relates :  
Description
The test api/java_lang/Math/rintround is failing on PPC64 platforms when running with -Xcomp -XX:-TieredCompilation.
C2 uses frin and xvrdpi instructions which don't use the required rounding mode. Rounding mode "RoundToDPIntegerNearEven" needs to be used. See
https://docs.oracle.com/javase/8/docs/api/java/lang/Math.html#rint-double-

Comments
Changeset: 1f2bf1d1 Author: Martin Doerr <mdoerr@openjdk.org> Date: 2021-07-07 12:52:18 +0000 URL: https://git.openjdk.java.net/jdk17/commit/1f2bf1d19482f9240ba494994b584d1cd7edf898
07-07-2021

ILW = JCK failure on PPC64, on PPC64 only with -Xcomp -XX:-TieredCompilation, disable RoundDoubleMode intrinsics = HMM = P2
06-07-2021