JDK-8278790 : Inner loop of long loop nest runs for too few iterations
  • Type: Bug
  • Component: hotspot
  • Sub-Component: compiler
  • Affected Version: 17,18
  • Priority: P3
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2021-12-14
  • Updated: 2022-01-03
  • Resolved: 2021-12-17
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 18 JDK 19
18 b29Fixed 19Fixed
Related Reports
Relates :  
Description
This came up with a panama micro-benchmark in which a loop has 256 iterations and a long range check with a small scale factor. A loop nest is created to transform the long range checks. The inner loop should still run for ~256 iterations but instead it only executes 256/scale iterations which has a performance impact.
Comments
Changeset: bb7efb35 Author: Roland Westrelin <roland@openjdk.org> Date: 2021-12-17 07:45:44 +0000 URL: https://git.openjdk.java.net/jdk18/commit/bb7efb3517b0ac66a55607c14aae3aef1f11c892
17-12-2021

ILW = performance problem = MMH = P3
15-12-2021

It's a performance issue, a fairly bad one in my opinion.
14-12-2021

Hi Roland, do we also observe a wrong execution or is it just a performance issue?
14-12-2021