Skip to content
Merged
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
9 changes: 8 additions & 1 deletion src/coreclr/jit/lower.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9439,9 +9439,16 @@ void Lowering::LowerStoreIndirCoalescing(GenTreeIndir* ind)
//
// IND<byte> is always fine (and all IND<X> created here from such)
// IND<simd> is not required to be atomic per our Memory Model
const bool allowsNonAtomic =
bool allowsNonAtomic =
((ind->gtFlags & GTF_IND_ALLOW_NON_ATOMIC) != 0) && ((prevInd->gtFlags & GTF_IND_ALLOW_NON_ATOMIC) != 0);

if (!allowsNonAtomic && currData.baseAddr->OperIs(GT_LCL_VAR) &&
(currData.baseAddr->AsLclVar()->GetLclNum() == comp->info.compRetBuffArg))
{
// RetBuf is a private stack memory, so we don't need to worry about atomicity.
allowsNonAtomic = true;
}

if (!allowsNonAtomic && (genTypeSize(ind) > 1) && !varTypeIsSIMD(ind))
{
// TODO-CQ: if we see that the target is a local memory (non address exposed)
Expand Down
Loading