JDK-8350579 : Remove Template Assertion Predicates belonging to a loop once it is folded away
  • Type: Sub-task
  • Component: hotspot
  • Sub-Component: compiler
  • Affected Version: 25
  • Priority: P3
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2025-02-24
  • Updated: 2025-03-27
  • Resolved: 2025-03-25
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 25
25 b16Fixed
Related Reports
Blocks :  
Blocks :  
Blocks :  
Causes :  
Duplicate :  
Relates :  
Description
Once a loop is folded, we are currently not removing the Template Assertion Predicates above it. They could end up at a different loop which does not have any predicates. When then splitting this loop, we wrongly pick the completely unrelated Template Assertion Predicates with different values and create Initialized Assertion Predicates from them which then crash with performing a halt instruction at runtime.

We should fold Template Assertion Predicates away once a loop dies. Doing it during IGVN is problematic as we need to handle all kinds of different dying graph shapes. We've decided to do it during normal Predicate elimination before applying loop opts. We can extend on the preparation done with JDK-8350578.

The fixes the report of JDK-8305428 and linked duplicates.
Comments
Changeset: c953e0ed Branch: master Author: Christian Hagedorn <chagedorn@openjdk.org> Date: 2025-03-25 11:58:28 +0000 URL: https://git.openjdk.org/jdk/commit/c953e0ede17aed9b80a637f1ffce90b2ea54ae21
25-03-2025

A pull request was submitted for review. Branch: master URL: https://git.openjdk.org/jdk/pull/23823 Date: 2025-02-27 13:07:46 +0000
27-02-2025