JDK-8346552 : C2: Add IR tests to check that Predicate cloning in Loop Unswitching works as expected
  • Type: Enhancement
  • Component: hotspot
  • Sub-Component: compiler
  • Affected Version: 25
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2024-12-18
  • Updated: 2025-05-08
  • Resolved: 2025-04-24
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 b21Fixed
Related Reports
Blocks :  
Relates :  
Description
While working on the Assertion Predicate patches (JDK-8288981 and related), I made a mistake and I ended up not copying Parse Predicates to the unswitched loops anymore. I've noticed that we do not have any tests in tier1-4 that would have caught that. Back there, when this Parse Predicate cloning was added (JDK-7004535) there was no IR framework around and it was hard to test this feature without manual inspection.

Now with the IR framework, it should be possible to construct an IR test(s) to check that. We could think about checking the following in a CompilePhase that still has the nodes around (not an exhaustive list):
- 2x the number of Parse Predicates after Loop Unswitching.
- Create a test that is only able to apply Loop Predication after Loop Unswitching. Then we can check if there are OpaqueTemplate/InitialiedAssertionPredicate nodes available which are created during Loop Predication.

Comments
Changeset: 84e9264e Branch: master Author: Manuel Hässig <manuel.hassig@oracle.com> Committer: Christian Hagedorn <chagedorn@openjdk.org> Date: 2025-04-24 08:29:08 +0000 URL: https://git.openjdk.org/jdk/commit/84e9264e76ca6e5d984c8eecbf5c5d11128fc174
24-04-2025

Required for properly matching some predicates in the IR-framework.
07-04-2025

A pull request was submitted for review. Branch: master URL: https://git.openjdk.org/jdk/pull/24479 Date: 2025-04-07 07:49:08 +0000
07-04-2025

Assigning to [~thartmann] to reserve for new hire that starts soon.
18-12-2024