RFR: 8373508: C2: sinking CreateEx out of loop breaks the graph
Roland Westrelin
roland at openjdk.org
Fri Dec 19 13:23:59 UTC 2025
On Wed, 17 Dec 2025 21:19:07 GMT, Dean Long <dlong at openjdk.org> wrote:
> > Whether that code is removed or not, it makes little sense to sink the CreateEx anyway.
>
> That's the part I'm still trying to understand. If we fix CreateExNode::Identity now and allow it to move outside the loop, the crash goes away. My understanding is that the CreateEx is for the exception handler. If the exception handler had a safepoint, then moving it out of the loop seems useful. What do you think?
// Create exception oop: created by stack-crawling runtime code.
// Created exception is now available to this handler, and is setup
// just prior to jumping to this handler. No code emitted.
instruct CreateException(rax_RegP ex_oop)
%{
match(Set ex_oop (CreateEx));
size(0);
`CreateEx` doesn't do anything. So it seems to me the risk of breaking something by accident in some uncommon case is not worth the risk and I would go with a conservative fix.
-------------
PR Comment: https://git.openjdk.org/jdk/pull/28842#issuecomment-3675069103
More information about the hotspot-compiler-dev
mailing list