diff --git a/src/coreclr/jit/lower.cpp b/src/coreclr/jit/lower.cpp index f8285cde29db6..d1c57a8d374bd 100644 --- a/src/coreclr/jit/lower.cpp +++ b/src/coreclr/jit/lower.cpp @@ -226,7 +226,7 @@ bool Lowering::IsSafeToContainMem(GenTree* parentNode, GenTree* childNode) const //------------------------------------------------------------------------ // IsSafeToContainMem: Checks for conflicts between childNode and grandParentNode -// and returns 'true' iff memory operand childNode can be contained in ancestorNode +// and returns 'true' iff memory operand childNode can be contained in grandParentNode. // // Arguments: // grandParentNode - any non-leaf node @@ -257,7 +257,7 @@ bool Lowering::IsSafeToMarkRegOptional(GenTree* parentNode, GenTree* childNode) } // We expect this to have interference as otherwise we could have marked it contained. - return IsInvariantInRange(childNode, parentNode); + return false; } //------------------------------------------------------------------------ diff --git a/src/coreclr/jit/lowerarmarch.cpp b/src/coreclr/jit/lowerarmarch.cpp index 692eb5b1ecdcf..6946c3d38a258 100644 --- a/src/coreclr/jit/lowerarmarch.cpp +++ b/src/coreclr/jit/lowerarmarch.cpp @@ -692,7 +692,7 @@ void Lowering::ContainBlockStoreAddress(GenTreeBlk* blkNode, unsigned size, GenT } #endif // !TARGET_ARM - if (!IsInvariantInRange(addr, addrParent, blkNode)) + if (!IsInvariantInRange(addr, blkNode, addrParent)) { return; } diff --git a/src/coreclr/jit/lowerloongarch64.cpp b/src/coreclr/jit/lowerloongarch64.cpp index 905e555e7935d..e7dd167deb2fb 100644 --- a/src/coreclr/jit/lowerloongarch64.cpp +++ b/src/coreclr/jit/lowerloongarch64.cpp @@ -356,7 +356,7 @@ void Lowering::ContainBlockStoreAddress(GenTreeBlk* blkNode, unsigned size, GenT return; } - if (!IsInvariantInRange(addr, addrParent, blkNode)) + if (!IsInvariantInRange(addr, blkNode, addrParent)) { return; } diff --git a/src/coreclr/jit/lowerxarch.cpp b/src/coreclr/jit/lowerxarch.cpp index 23372fbeb857c..166a876e80cf6 100644 --- a/src/coreclr/jit/lowerxarch.cpp +++ b/src/coreclr/jit/lowerxarch.cpp @@ -537,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 (!IsInvariantInRange(addrMode, addrParent, blkNode)) + if (!IsInvariantInRange(addrMode, blkNode, addrParent)) { return; }