Skip to content
This repository has been archived by the owner on Jan 23, 2023. It is now read-only.

Commit

Permalink
do not spill stack after CEE_NEWARR and CEE_NEWOBJ. (#14401)
Browse files Browse the repository at this point in the history
Fixes coreRT issue with "InitializeArray intrinsic must always be
expanded".
  • Loading branch information
Sergey Andreenko authored Oct 10, 2017
1 parent 0b7ded9 commit 5db8735
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/jit/importer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2596,9 +2596,9 @@ inline IL_OFFSETX Compiler::impCurILOffset(IL_OFFSET offs, bool callInstruction)
// true if it is legal, false if it could be a sequence that we do not want to divide.
bool Compiler::impCanSpillNow(OPCODE prevOpcode)
{
// Don't spill after ldtoken, because it could be a part of the InitializeArray sequence.
// Don't spill after ldtoken, newarr and newobj, because it could be a part of the InitializeArray sequence.
// Avoid breaking up to guarantee that impInitializeArrayIntrinsic can succeed.
return prevOpcode != CEE_LDTOKEN;
return (prevOpcode != CEE_LDTOKEN) && (prevOpcode != CEE_NEWARR) && (prevOpcode != CEE_NEWOBJ);
}

/*****************************************************************************
Expand Down

0 comments on commit 5db8735

Please sign in to comment.