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.
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.
- relates to
-
JDK-7004535 Clone loop predicate during loop unswitch
- Closed