RFR: 8306997: C2: "malformed control flow" assert due to missing safepoint on backedge with a switch
Roland Westrelin
roland at openjdk.org
Thu Apr 27 11:44:54 UTC 2023
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.
-------------
Commit messages:
- test & fix
Changes: https://git.openjdk.org/jdk/pull/13688/files
Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=13688&range=00
Issue: https://bugs.openjdk.org/browse/JDK-8306997
Stats: 106 lines in 3 files changed: 104 ins; 0 del; 2 mod
Patch: https://git.openjdk.org/jdk/pull/13688.diff
Fetch: git fetch https://git.openjdk.org/jdk.git pull/13688/head:pull/13688
PR: https://git.openjdk.org/jdk/pull/13688
More information about the hotspot-compiler-dev
mailing list