[11] RFR(S): 8202949: C2: assert(false) failed: Bad graph detected in build_loop_late

Tobias Hartmann tobias.hartmann at oracle.com
Wed May 23 10:56:03 UTC 2018


Hi,

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

We crash during loop opts verification because memory from a non-dominating path is consumed by a
MemBarReleaseNode. The problem is that a range check dependent CastII is removed because the type of
the input value is always in bounds. The corresponding ConvI2L floats up during loop optimizations
and becomes TOP because the loop induction variable of the unrolled loop is out of bounds. As a
result, the memory graph is corrupted with memory consuming nodes still being reachable because the
dead loop is not (yet) removed (Opaque1 nodes are still guarding the bounds). See comment in test
for details.

Range check dependent CastIIs were introduced to fix JDK-6675699 and should not be removed. The
offending code was introduced by JDK-8139771.

Thanks,
Tobias


More information about the hotspot-compiler-dev mailing list