JDK-8262721 : Add Tests to verify single iteration loops are properly optimized
  • Type: Enhancement
  • Component: hotspot
  • Sub-Component: compiler
  • Affected Version: 17,18,19
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2021-03-01
  • Updated: 2022-09-21
  • Resolved: 2022-02-11
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 17 JDK 18 JDK 19
17.0.6-oracleFixed 18Resolved 19 b10Fixed
Related Reports
Relates :  
Relates :  
Description
Came up during review of JDK-8261308:

"would be nice to have tests for 0,1,2 iterations and all 3 types of loops: for() {}, while() {}, do {} while() to verify that they are converted to straight code."


Comments
Fix request [17u] I backport this for parity with 17.0.6-oracle. No risk, only a test change. Clean backport. Test passes. SAP nightly testing passed.
21-09-2022

A pull request was submitted for review. URL: https://git.openjdk.org/jdk17u-dev/pull/693 Date: 2022-09-19 20:27:51 +0000
19-09-2022

Fix was pushed while main bug was targeted to 18. Reset the main bug to fixed in 19 and copied the Robo Duke entry here.
11-02-2022

Changeset: 69e390a0 Author: Roland Westrelin <roland@openjdk.org> Date: 2022-02-09 10:18:27 +0000 URL: https://git.openjdk.java.net/jdk/commit/69e390a0e86f82eaa7bcdbc3ef509734dbe3b22f
11-02-2022

A pull request was submitted for review. URL: https://git.openjdk.java.net/jdk/pull/7368 Date: 2022-02-07 13:49:27 +0000
07-02-2022

[~roland], I assume you aren't actively working on making sure this one gets integrated into 17, so I'm retargeting it 18.
05-08-2021

As suggested in the review of JDK-8261308: This seems like a good candidate to use the new IR test framework (JDK-8254129).
01-03-2021