[14] RFR(S): 8235452: Strip mined loop verification fails with assert(is_OuterStripMinedLoop()) failed: invalid node class

Tobias Hartmann tobias.hartmann at oracle.com
Mon Dec 9 13:59:23 UTC 2019


Hi,

please review the following patch:
https://bugs.openjdk.java.net/browse/JDK-8235452
http://cr.openjdk.java.net/~thartmann/8235452/webrev.00/

We crash during loop verification because a strip mined loop lost its OuterStripMined loop
counterpart. Removal of the outer loop is triggered by the new optimization added with JDK-8220376
[1] but it can probably happen in other circumstances as well. The strip mined loop also lost its
CountedLoopEnd and is therefore malformed.

The detailed steps of how this happens are described in the test:
http://cr.openjdk.java.net/~thartmann/8235452/webrev.00/test/hotspot/jtreg/compiler/loopstripmining/TestDeadOuterStripMinedLoop.java.html

The fix is to not try to verify strip mining if the strip mined loop is malformed. I've added an
assert to check that the OuterStripMinedLoop is always removed in this case.

The test also triggers a crash in the UseProfiledLoopPredicate code added by JDK-8203197 [2]. I've
slightly modified the code in loopPredicate.cpp to only execute PathFrequency::to if the projection
matches the uncommon trap if pattern and filed JDK-8235584 [3] to investigate in detail.

Thanks,
Tobias

[1] https://bugs.openjdk.java.net/browse/JDK-8220376
[2] https://bugs.openjdk.java.net/browse/JDK-8203197
[3] https://bugs.openjdk.java.net/browse/JDK-8235584


More information about the hotspot-compiler-dev mailing list