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

Tobias Hartmann thartmann at openjdk.org
Fri Apr 28 06:45:30 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.

Looks good to me.

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

Marked as reviewed by thartmann (Reviewer).

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


More information about the hotspot-compiler-dev mailing list