Skip to content

Commit 49387ef

Browse files
authored
JIT: Allow forward subbing no-return calls (dotnet#115976)
The comment refers to morph getting tripped up, but that should not be the case anymore after 24786d2.
1 parent db27700 commit 49387ef

File tree

1 file changed

+2
-11
lines changed

1 file changed

+2
-11
lines changed

src/coreclr/jit/forwardsub.cpp

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -498,20 +498,11 @@ bool Compiler::fgForwardSubStatement(Statement* stmt)
498498
//
499499
GenTree* fwdSubNode = defNode->AsLclVarCommon()->Data();
500500

501-
// Can't substitute GT_CATCH_ARG.
502-
// Can't substitute GT_LCLHEAP.
501+
// Can't substitute GT_CATCH_ARG, GT_LCLHEAP or GT_ASYNC_CONTINUATION.
503502
//
504503
if (fwdSubNode->OperIs(GT_CATCH_ARG, GT_LCLHEAP, GT_ASYNC_CONTINUATION))
505504
{
506-
JITDUMP(" tree to sub is catch arg, or lcl heap\n");
507-
return false;
508-
}
509-
510-
// Don't substitute a no return call (trips up morph in some cases).
511-
//
512-
if (fwdSubNode->IsCall() && fwdSubNode->AsCall()->IsNoReturn())
513-
{
514-
JITDUMP(" tree to sub is a 'no return' call\n");
505+
JITDUMP(" tree to sub is %s\n", GenTree::OpName(fwdSubNode->OperGet()));
515506
return false;
516507
}
517508

0 commit comments

Comments
 (0)