JDK-8349523 : Unused runtime calls to drem/frem should be removed
  • Type: Enhancement
  • Component: hotspot
  • Sub-Component: compiler
  • Affected Version: 25
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2025-02-06
  • Updated: 2025-03-13
  • Resolved: 2025-03-03
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 25
25 b13Fixed
Related Reports
Relates :  
Relates :  
Relates :  
Description
Attached Test2.java demonstrates that C2 does not remove unused runtime calls emitted for drem/frem.

java -XX:-TieredCompilation -XX:CompileCommand=print,Test2::test1 -Xbatch Test2.java

[...]

  0x00007467451ccd44:   callq  *%r10
  0x00007467451ccd47:   nopl   0x0(%rax,%rax,1)             ;*frem {reexecute=0 rethrow=0 return_oop=0}
                                                            ; - Test2::test2@2 (line 8)
                                                            ;   {post_call_nop}
  0x00007467451ccd4f:   add    $0x10,%rsp


[...]

This is a follow-up from JDK-8345766.
Comments
Changeset: 4109c73a Branch: master Author: Marc Chevalier <marc.chevalier@oracle.com> Date: 2025-03-03 09:32:54 +0000 URL: https://git.openjdk.org/jdk/commit/4109c73a78c424d409e9fdd96913a772467666c8
03-03-2025

A pull request was submitted for review. Branch: master URL: https://git.openjdk.org/jdk/pull/23694 Date: 2025-02-19 12:47:03 +0000
19-02-2025