RFR(S): 8235584: UseProfiledLoopPredicate fails with assert(_phase->get_loop(c) == loop) failed: have to be in the same loop
Roland Westrelin
rwestrel at redhat.com
Mon Jan 13 10:54:26 UTC 2020
http://cr.openjdk.java.net/~roland/8235584/webrev.00/
This is related to 8235452. As explained by Tobias:
https://mail.openjdk.java.net/pipermail/hotspot-compiler-dev/2019-December/036344.html
a strip mined loop is transformed so the CountedLoopEnd and the outer
strip mined loop are optimized out. There's still a loop but it's not
longer strip mined and not even a valid counted loop anymore but it
stays a CountedLoopNode with the strip mined flag set to true.
The loop predication code fails with an assert because when it
encounters the CountedLoop, the call to skip_strip_mined() sees it's
flagged as strip mined so it needs to skip the outer strip mined loop
but because the CountedLoop is no longer strip mined, it skips some
control that are not the outer loop. The fix is to check both whether
the loop is flagged as strip mined and a valid counted loop in
skip_strip_mined().
Also, the fix that Tobias pushed for 8235452 erroneously disabled
verification for the outer strip mined loop. This change restores it.
Roland.
More information about the hotspot-compiler-dev
mailing list