RFR: 8307131: C2: assert(false) failed: malformed control flow

Christian Hagedorn chagedorn at openjdk.org
Mon May 8 06:23:25 UTC 2023


On Fri, 5 May 2023 08:48:06 GMT, Roland Westrelin <roland at openjdk.org> wrote:

> The IR graph has a loop nest with 2 loops and 2 safepoints. Both
> safepoints are in the inner loop. One is on the backedge of the inner
> loop. The inner loop is transformed into a counted loop and that
> safepoint is removed. The other safepoint is right above the inner
> loop's exit condition. The outer strip mined loop is constructed and
> the safepoint is moved to the outer strip mined loop eventhough that
> safepoint is marked as non deleteable. The inner loop is later on
> removed, the outer strip mined loop is too, so is the safepoint. What
> was the outer loop of the 2 loop nest becomes an infinite loop without
> a safepoint and is considered dead code which in turn causes the
> assert to fire.
> 
> The fix I propose is to only build the strip mined loop if the
> safepoint that's moved to the outer strip mined loop is deleteable.

Looks good!

-------------

Marked as reviewed by chagedorn (Reviewer).

PR Review: https://git.openjdk.org/jdk/pull/13826#pullrequestreview-1416185530


More information about the hotspot-compiler-dev mailing list