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

Roland Westrelin roland at openjdk.org
Wed May 3 08:32:27 UTC 2023


On Fri, 28 Apr 2023 06:29:56 GMT, Tobias Hartmann <thartmann 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.

@TobiHartmann @vnkozlov thanks for the reviews.

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

PR Comment: https://git.openjdk.org/jdk/pull/13688#issuecomment-1532638132


More information about the hotspot-compiler-dev mailing list