JDK-8366973 : [lworld] Deopt/recompilation cycle due to call to method with unloaded return type
  • Type: Bug
  • Component: hotspot
  • Sub-Component: compiler
  • Affected Version: repo-valhalla
  • Priority: P3
  • Status: In Progress
  • Resolution: Unresolved
  • Submitted: 2025-09-05
  • Updated: 2025-09-05
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
repo-valhallaUnresolved
Related Reports
Causes :  
Description
Originally reported by [~ecaspole].

In some benchmarks we hit an endless deopt/recompilation cycle because of this bailout in C2 when we compile a method with an unloaded return type:
https://github.com/openjdk/valhalla/blob/858be30119bd5bc37a69d16042523f53bea71a36/src/hotspot/share/ci/ciTypeFlow.cpp#L766-L772

It's a regression / limitation from JDK-8301007 that I had planned to fix later with JDK-8284443 because I thought it wouldn't have an impact on performance. Turns out it does, so I'll fix it separately with this issue.