Skip to content

JIT: Allow forward subbing no-return calls #115976

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
May 28, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 2 additions & 11 deletions src/coreclr/jit/forwardsub.cpp
Original file line number Diff line number Diff line change
@@ -498,20 +498,11 @@ bool Compiler::fgForwardSubStatement(Statement* stmt)
//
GenTree* fwdSubNode = defNode->AsLclVarCommon()->Data();

// Can't substitute GT_CATCH_ARG.
// Can't substitute GT_LCLHEAP.
// Can't substitute GT_CATCH_ARG, GT_LCLHEAP or GT_ASYNC_CONTINUATION.
//
if (fwdSubNode->OperIs(GT_CATCH_ARG, GT_LCLHEAP, GT_ASYNC_CONTINUATION))
{
JITDUMP(" tree to sub is catch arg, or lcl heap\n");
return false;
}

// Don't substitute a no return call (trips up morph in some cases).
//
if (fwdSubNode->IsCall() && fwdSubNode->AsCall()->IsNoReturn())
{
JITDUMP(" tree to sub is a 'no return' call\n");
JITDUMP(" tree to sub is %s\n", GenTree::OpName(fwdSubNode->OperGet()));
return false;
}

Loading
Oops, something went wrong.