RFR(S): 8196296: Lucene test crashes C2 compilation

Roland Westrelin rwestrel at redhat.com
Fri Jan 26 22:21:17 UTC 2018


C2 attempts to merge 2 back to back ifs with the same condition:

if (condition) {

} else {


if (condition) {

but the second if is a counted loop end test. This causes the counted
loop to not keep a canonical shape. With debug builds, loop strip mining
verification code then causes the test to crash. With product builds,
the logic that finalizes the outer strip mined loop bails out but leaves
the outer loop. The test of the outer loop is turned into an If with a
constant input that's not optimized out. In the reported failure,
Matcher code then breaks because the If has a non Cmp input. I fixed
the logic in OuterStripMinedLoopNode::adjust_strip_mined_loop() so that
when it bails out, it causes the outer loop to go away and prevent 2
back to back ifs to merge if the second one is a counted loop end.


More information about the hotspot-compiler-dev mailing list