RFR: 8306997: C2: "malformed control flow" assert due to missing safepoint on backedge with a switch

Vladimir Kozlov kvn at openjdk.org
Fri Apr 28 18:59:59 UTC 2023


On Thu, 27 Apr 2023 11:27:30 GMT, Roland Westrelin <roland at openjdk.org> wrote:

> The assert fires because a self loop (a `Loop` whose second input is
> itself) is removed by loop opts. That loop comes from a switch where
> the default case is a loop head (a code shape I couldn't get javac to
> produce). That `Loop` should at the very least have a `Safepoint` but
> the logic at parse time only looks for backedges in the non default
> cases. With that fixed, the `Loop` is no longer considered dead code.

Good.

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

Marked as reviewed by kvn (Reviewer).

PR Review: https://git.openjdk.org/jdk/pull/13688#pullrequestreview-1406445600


More information about the hotspot-compiler-dev mailing list