Skip to content
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

JIT: Move cpblk GC ref layout check back to lowering #72516

Merged
merged 1 commit into from
Jul 21, 2022
Merged
Show file tree
Hide file tree
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
3 changes: 1 addition & 2 deletions src/coreclr/jit/codegenarmarch.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2858,8 +2858,7 @@ void CodeGen::genCodeForCpBlkUnroll(GenTreeBlk* node)
}
#endif

if (!node->gtBlkOpGcUnsafe &&
((srcOffsetAdjustment != 0) || (dstOffsetAdjustment != 0) || (node->GetLayout()->HasGCPtr())))
if (!node->gtBlkOpGcUnsafe && ((srcOffsetAdjustment != 0) || (dstOffsetAdjustment != 0)))
{
// If node is not already marked as non-interruptible, and if are about to generate code
// that produce GC references in temporary registers not reported, then mark the block
Expand Down
7 changes: 6 additions & 1 deletion src/coreclr/jit/lowerarmarch.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -493,10 +493,15 @@ void Lowering::LowerBlockStore(GenTreeBlk* blkNode)

if (blkNode->OperIs(GT_STORE_OBJ))
{
if (!blkNode->AsObj()->GetLayout()->HasGCPtr() || (isDstAddrLocal && (size <= copyBlockUnrollLimit)))
if (!blkNode->AsObj()->GetLayout()->HasGCPtr())
{
blkNode->SetOper(GT_STORE_BLK);
}
else if (isDstAddrLocal && (size <= copyBlockUnrollLimit))
{
blkNode->SetOper(GT_STORE_BLK);
blkNode->gtBlkOpGcUnsafe = true;
}
}

if (blkNode->OperIs(GT_STORE_OBJ))
Expand Down