RFR: 8373508: C2: sinking CreateEx out of loop breaks the graph
Roland Westrelin
roland at openjdk.org
Tue Dec 16 11:15:35 UTC 2025
A `CreateEx` gets sunk out of loop by
`PhaseIdealLoop::try_sink_out_of_loop()` and, as a consequence, the
following logic:
return (in(0)->is_CatchProj() && in(0)->in(0)->is_Catch() &&
in(0)->in(0)->in(1) == in(1)) ? this : call->in(TypeFunc::Parms);
in `CreateExNode::Identity()` triggers which leads to the crash
because `call->in(TypeFunc::Parms)` is not even an object in this
particular case.
It's actually not clear to me what that logic in
`CreateExNode::Identity()` is expected to do and I wonder if it's
still needed.
Anyway, the fix I propose is to skip `CreateEx` in
`PhaseIdealLoop::try_sink_out_of_loop()`.
-------------
Commit messages:
- whitespaces
- tests
- more
- fix
Changes: https://git.openjdk.org/jdk/pull/28842/files
Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=28842&range=00
Issue: https://bugs.openjdk.org/browse/JDK-8373508
Stats: 160 lines in 3 files changed: 160 ins; 0 del; 0 mod
Patch: https://git.openjdk.org/jdk/pull/28842.diff
Fetch: git fetch https://git.openjdk.org/jdk.git pull/28842/head:pull/28842
PR: https://git.openjdk.org/jdk/pull/28842
More information about the hotspot-compiler-dev
mailing list