Skip to content
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
2 changes: 1 addition & 1 deletion src/coreclr/jit/lower.h
Original file line number Diff line number Diff line change
Expand Up @@ -317,7 +317,7 @@ class Lowering final : public Phase
GenTree* LowerSignedDivOrMod(GenTree* node);
void LowerBlockStore(GenTreeBlk* blkNode);
void LowerBlockStoreCommon(GenTreeBlk* blkNode);
void ContainBlockStoreAddress(GenTreeBlk* blkNode, unsigned size, GenTree* addr);
void ContainBlockStoreAddress(GenTreeBlk* blkNode, unsigned size, GenTree* addr, GenTree* addrParent);
void LowerPutArgStkOrSplit(GenTreePutArgStk* putArgNode);
#ifdef TARGET_XARCH
void LowerPutArgStk(GenTreePutArgStk* putArgStk);
Expand Down
11 changes: 6 additions & 5 deletions src/coreclr/jit/lowerarmarch.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -566,7 +566,7 @@ void Lowering::LowerBlockStore(GenTreeBlk* blkNode)

src->AsIntCon()->SetIconValue(fill);

ContainBlockStoreAddress(blkNode, size, dstAddr);
ContainBlockStoreAddress(blkNode, size, dstAddr, nullptr);
}
else
{
Expand Down Expand Up @@ -637,10 +637,10 @@ void Lowering::LowerBlockStore(GenTreeBlk* blkNode)

if (src->OperIs(GT_IND))
{
ContainBlockStoreAddress(blkNode, size, src->AsIndir()->Addr());
ContainBlockStoreAddress(blkNode, size, src->AsIndir()->Addr(), src->AsIndir());
}

ContainBlockStoreAddress(blkNode, size, dstAddr);
ContainBlockStoreAddress(blkNode, size, dstAddr, nullptr);
}
else
{
Expand All @@ -658,8 +658,9 @@ void Lowering::LowerBlockStore(GenTreeBlk* blkNode)
// blkNode - the block store node
// size - the block size
// addr - the address node to try to contain
// addrParent - the parent of addr, in case this is checking containment of the source address.
//
void Lowering::ContainBlockStoreAddress(GenTreeBlk* blkNode, unsigned size, GenTree* addr)
void Lowering::ContainBlockStoreAddress(GenTreeBlk* blkNode, unsigned size, GenTree* addr, GenTree* addrParent)
{
assert(blkNode->OperIs(GT_STORE_BLK) && (blkNode->gtBlkOpKind == GenTreeBlk::BlkOpKindUnroll));
assert(size < INT32_MAX);
Expand Down Expand Up @@ -692,7 +693,7 @@ void Lowering::ContainBlockStoreAddress(GenTreeBlk* blkNode, unsigned size, GenT
}
#endif // !TARGET_ARM

if (!IsSafeToContainMem(blkNode, addr))
if (!IsSafeToContainMem(blkNode, addrParent, addr))
{
return;
}
Expand Down
12 changes: 7 additions & 5 deletions src/coreclr/jit/lowerloongarch64.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,7 @@ void Lowering::LowerBlockStore(GenTreeBlk* blkNode)
}
src->AsIntCon()->SetIconValue(fill);

ContainBlockStoreAddress(blkNode, size, dstAddr);
ContainBlockStoreAddress(blkNode, size, dstAddr, nullptr);
}
else
{
Expand Down Expand Up @@ -307,10 +307,10 @@ void Lowering::LowerBlockStore(GenTreeBlk* blkNode)

if (src->OperIs(GT_IND))
{
ContainBlockStoreAddress(blkNode, size, src->AsIndir()->Addr());
ContainBlockStoreAddress(blkNode, size, src->AsIndir()->Addr(), src->AsIndir());
}

ContainBlockStoreAddress(blkNode, size, dstAddr);
ContainBlockStoreAddress(blkNode, size, dstAddr, nullptr);
}
else
{
Expand All @@ -328,8 +328,10 @@ void Lowering::LowerBlockStore(GenTreeBlk* blkNode)
// blkNode - the block store node
// size - the block size
// addr - the address node to try to contain
// addrParent - the parent of addr, in case this is checking containment of the source address.
//
void Lowering::ContainBlockStoreAddress(GenTreeBlk* blkNode, unsigned size, GenTree* addr)
void Lowering::ContainBlockStoreAddress(GenTreeBlk* blkNode, unsigned size, GenTree* addr, GenTree* addrParent)

{
assert(blkNode->OperIs(GT_STORE_BLK) && (blkNode->gtBlkOpKind == GenTreeBlk::BlkOpKindUnroll));
assert(size < INT32_MAX);
Expand All @@ -354,7 +356,7 @@ void Lowering::ContainBlockStoreAddress(GenTreeBlk* blkNode, unsigned size, GenT
return;
}

if (!IsSafeToContainMem(blkNode, addr))
if (!IsSafeToContainMem(blkNode, addrParent, addr))
{
return;
}
Expand Down
11 changes: 6 additions & 5 deletions src/coreclr/jit/lowerxarch.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -373,7 +373,7 @@ void Lowering::LowerBlockStore(GenTreeBlk* blkNode)

src->AsIntCon()->SetIconValue(fill);

ContainBlockStoreAddress(blkNode, size, dstAddr);
ContainBlockStoreAddress(blkNode, size, dstAddr, nullptr);
}
}
else
Expand Down Expand Up @@ -478,10 +478,10 @@ void Lowering::LowerBlockStore(GenTreeBlk* blkNode)

if (src->OperIs(GT_IND))
{
ContainBlockStoreAddress(blkNode, size, src->AsIndir()->Addr());
ContainBlockStoreAddress(blkNode, size, src->AsIndir()->Addr(), src->AsIndir());
}

ContainBlockStoreAddress(blkNode, size, dstAddr);
ContainBlockStoreAddress(blkNode, size, dstAddr, nullptr);
}
else
{
Expand All @@ -504,8 +504,9 @@ void Lowering::LowerBlockStore(GenTreeBlk* blkNode)
// blkNode - the block store node
// size - the block size
// addr - the address node to try to contain
// addrParent - the parent of addr, in case this is checking containment of the source address.
//
void Lowering::ContainBlockStoreAddress(GenTreeBlk* blkNode, unsigned size, GenTree* addr)
void Lowering::ContainBlockStoreAddress(GenTreeBlk* blkNode, unsigned size, GenTree* addr, GenTree* addrParent)
{
assert(blkNode->OperIs(GT_STORE_BLK) && (blkNode->gtBlkOpKind == GenTreeBlk::BlkOpKindUnroll));
assert(size < INT32_MAX);
Expand Down Expand Up @@ -536,7 +537,7 @@ void Lowering::ContainBlockStoreAddress(GenTreeBlk* blkNode, unsigned size, GenT
// Note that the parentNode is always the block node, even if we're dealing with the source address.
// The source address is not directly used by the block node but by an IND node and that IND node is
// always contained.
if (!IsSafeToContainMem(blkNode, addrMode))
if (!IsSafeToContainMem(blkNode, addrParent, addrMode))
{
return;
}
Expand Down