JDK-8352154 : Folding optimizations for Float16
  • Type: Enhancement
  • Component: hotspot
  • Sub-Component: compiler
  • Affected Version: 25
  • Priority: P4
  • Status: Closed
  • Resolution: Duplicate
  • OS: generic
  • CPU: generic
  • Submitted: 2025-03-17
  • Updated: 2025-05-12
  • Resolved: 2025-05-12
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
tbdResolved
Related Reports
Duplicate :  
Relates :  
Description
The new C2 compiler support for Float16, or HalfFloat in the Ideal Graph, is missing some easy optimizations.
 - Conversion folding: sequences of ConvertHF2F and ConvertF2HF are not eliminated.
 - Float16 constants created with the idiom `Float16.valueOf(3.14f)` end up as a ConF in the ideal graph, preventing 16-bit subtraction in the case of `1 - (2 - f)` (see attached graph).
Comments
This is a duplicate of JDK-8352635 that is being fixed as I comment.
12-05-2025