[14] RFR(S): 8231223: C2's conditional move optimization fails with assert(bol->Opcode() == Op_Bool) failed
Tobias Hartmann
tobias.hartmann at oracle.com
Fri Sep 20 07:47:02 UTC 2019
Hi,
please review the following patch:
https://bugs.openjdk.java.net/browse/JDK-8231223
http://cr.openjdk.java.net/~thartmann/8231223/webrev.00/
Summary:
After a series of loop optimizations, a skeleton range check predicate ends up with both if
projections being wired to an uncommon trap region and is then considered by the conditional move
optimization because the region has a suitable phi user:
https://bugs.openjdk.java.net/secure/attachment/84924/graph_conditional_move.png
The conditional move optimization then asserts because the range check If has an Opaque4Node input
instead of a BoolNode. I propose to simply bail out in this case.
Details:
One of the switch branches in the inner loop gets predicated and after unrolling both loops, the
other branches are found to be dead. As a result, the passing projection of the skeleton range check
predicate does not point to the loop (body) anymore but to the uncommon trap as well. The generated
code will immediately deoptimize but recompilation will then be more conservative.
Thanks,
Tobias
More information about the hotspot-compiler-dev
mailing list