JDK-8360096 : C2/loop strip mining: investigate fully built outer loop from construction
  • Type: Enhancement
  • Component: hotspot
  • Sub-Component: compiler
  • Affected Version: 26
  • Priority: P4
  • Status: Open
  • Resolution: Unresolved
  • Submitted: 2025-06-20
  • Updated: 2025-06-23
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
Loop strip mining construction is a 2 step process: initially, the outer loop is only built as a skeleton without Phis. After loop opts, Phis are added to the outer loop. The motivation for this is to keep the outer loop as simple as possible during loop opts so loop opts can mostly ignore it's there. The drawback is a somewhat complicated second step in some corner cases.

It's possible that fully constructing the outer loop wouldn't affect loop opts that much and would be a better trade off. 

See discussion:
https://github.com/openjdk/jdk/pull/25717#issuecomment-2960287377
https://github.com/openjdk/jdk/pull/25717#issuecomment-2966381509
https://github.com/openjdk/jdk/pull/25717#issuecomment-2967236228
https://github.com/openjdk/jdk/pull/25717#issuecomment-2967280652
https://github.com/openjdk/jdk/pull/25717#issuecomment-2969458368
https://github.com/openjdk/jdk/pull/25717#pullrequestreview-2934351620
Comments
We should probably increase our IR test coverage for loop-opts first, just to make sure we don't get regressions: JDK-8356708
20-06-2025