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

Roland Westrelin roland at openjdk.org
Tue May 9 09:57:39 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.

This pull request has now been integrated.

Changeset: d2b3eef0
Author:    Roland Westrelin <roland at openjdk.org>
URL:       https://git.openjdk.org/jdk/commit/d2b3eef0f2d48446613955cabe69cb4236042878
Stats:     58 lines in 2 files changed: 57 ins; 0 del; 1 mod

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

Reviewed-by: kvn, chagedorn, thartmann

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

PR: https://git.openjdk.org/jdk/pull/13826


More information about the hotspot-compiler-dev mailing list