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

Commit 2a50305

Browse files
authored
Merge pull request #15706 from dotnet-bot/from-tfs (#15744)
Merge changes from TFS
1 parent c571777 commit 2a50305

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

src/jit/importer.cpp

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10220,13 +10220,14 @@ void Compiler::impImportBlockCode(BasicBlock* block)
1022010220

1022110221
op2 = gtNewLclvNode(lclNum, lclTyp, opcodeOffs + sz + 1);
1022210222

10223-
/* If the local is aliased, we need to spill calls and
10223+
/* If the local is aliased or pinned, we need to spill calls and
1022410224
indirections from the stack. */
1022510225

10226-
if ((lvaTable[lclNum].lvAddrExposed || lvaTable[lclNum].lvHasLdAddrOp) &&
10227-
verCurrentState.esStackDepth > 0)
10226+
if ((lvaTable[lclNum].lvAddrExposed || lvaTable[lclNum].lvHasLdAddrOp || lvaTable[lclNum].lvPinned) &&
10227+
(verCurrentState.esStackDepth > 0))
1022810228
{
10229-
impSpillSideEffects(false, (unsigned)CHECK_SPILL_ALL DEBUGARG("Local could be aliased"));
10229+
impSpillSideEffects(false,
10230+
(unsigned)CHECK_SPILL_ALL DEBUGARG("Local could be aliased or is pinned"));
1023010231
}
1023110232

1023210233
/* Spill any refs to the local from the stack */

0 commit comments

Comments
 (0)