Skip to content

Commit

Permalink
Mark "push [mem]" candidates reg optional (#68641)
Browse files Browse the repository at this point in the history
  • Loading branch information
SingleAccretion authored May 9, 2022
1 parent e7f1655 commit 95952a6
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions src/coreclr/jit/lowerxarch.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -647,11 +647,17 @@ void Lowering::LowerPutArgStk(GenTreePutArgStk* putArgStk)
MakeSrcContained(putArgStk, src);
}
#ifdef TARGET_X86
else if ((genTypeSize(src) == TARGET_POINTER_SIZE) && IsContainableMemoryOp(src) &&
IsSafeToContainMem(putArgStk, src))
else if ((genTypeSize(src) == TARGET_POINTER_SIZE) && IsSafeToContainMem(putArgStk, src))
{
// Contain for "push [mem]".
MakeSrcContained(putArgStk, src);
// We can use "src" directly from memory with "push [mem]".
if (IsContainableMemoryOp(src))
{
MakeSrcContained(putArgStk, src);
}
else
{
src->SetRegOptional();
}
}
#endif // TARGET_X86
}
Expand Down

0 comments on commit 95952a6

Please sign in to comment.