Skip to content

Commit 8df13a7

Browse files
committed
Fix bad refactoring
1 parent cf0952b commit 8df13a7

4 files changed

Lines changed: 5 additions & 5 deletions

File tree

src/coreclr/jit/lower.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -226,7 +226,7 @@ bool Lowering::IsSafeToContainMem(GenTree* parentNode, GenTree* childNode) const
226226

227227
//------------------------------------------------------------------------
228228
// IsSafeToContainMem: Checks for conflicts between childNode and grandParentNode
229-
// and returns 'true' iff memory operand childNode can be contained in ancestorNode
229+
// and returns 'true' iff memory operand childNode can be contained in grandParentNode.
230230
//
231231
// Arguments:
232232
// grandParentNode - any non-leaf node
@@ -257,7 +257,7 @@ bool Lowering::IsSafeToMarkRegOptional(GenTree* parentNode, GenTree* childNode)
257257
}
258258

259259
// We expect this to have interference as otherwise we could have marked it contained.
260-
return IsInvariantInRange(childNode, parentNode);
260+
return false;
261261
}
262262

263263
//------------------------------------------------------------------------

src/coreclr/jit/lowerarmarch.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -692,7 +692,7 @@ void Lowering::ContainBlockStoreAddress(GenTreeBlk* blkNode, unsigned size, GenT
692692
}
693693
#endif // !TARGET_ARM
694694

695-
if (!IsInvariantInRange(addr, addrParent, blkNode))
695+
if (!IsInvariantInRange(addr, blkNode, addrParent))
696696
{
697697
return;
698698
}

src/coreclr/jit/lowerloongarch64.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -356,7 +356,7 @@ void Lowering::ContainBlockStoreAddress(GenTreeBlk* blkNode, unsigned size, GenT
356356
return;
357357
}
358358

359-
if (!IsInvariantInRange(addr, addrParent, blkNode))
359+
if (!IsInvariantInRange(addr, blkNode, addrParent))
360360
{
361361
return;
362362
}

src/coreclr/jit/lowerxarch.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -537,7 +537,7 @@ void Lowering::ContainBlockStoreAddress(GenTreeBlk* blkNode, unsigned size, GenT
537537
// Note that the parentNode is always the block node, even if we're dealing with the source address.
538538
// The source address is not directly used by the block node but by an IND node and that IND node is
539539
// always contained.
540-
if (!IsInvariantInRange(addrMode, addrParent, blkNode))
540+
if (!IsInvariantInRange(addrMode, blkNode, addrParent))
541541
{
542542
return;
543543
}

0 commit comments

Comments
 (0)