Skip to content

Commit ec246cf

Browse files
committed
Simplify checks.
Change-Id: Iea7753ccc9fe18c8fb70ab0dc4a1117cd619f49f
1 parent 076e7ea commit ec246cf

File tree

1 file changed

+2
-9
lines changed

1 file changed

+2
-9
lines changed

llvm/lib/Target/AArch64/AArch64ISelLowering.cpp

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -29471,15 +29471,8 @@ bool AArch64TargetLowering::storeNeedsSeqCstTrailingFence(
2947129471
if (RMW && RMW->getOrdering() != AtomicOrdering::SequentiallyConsistent)
2947229472
return false;
2947329473

29474-
// We do not need a fence only if we have LSE and are not expanding.
29475-
TargetLoweringBase::AtomicExpansionKind ExpandKind =
29476-
CAS ? shouldExpandAtomicCmpXchgInIR(CAS) : shouldExpandAtomicRMWInIR(RMW);
29477-
if (ExpandKind == AtomicExpansionKind::None && Subtarget->hasLSE())
29478-
return false;
29479-
if (RMW && ExpandKind == AtomicExpansionKind::CmpXChg && Subtarget->hasLSE())
29480-
return false;
29481-
29482-
return true;
29474+
// We do not need a fence if we have LSE atomics.
29475+
return !Subtarget->hasLSE();
2948329476
}
2948429477

2948529478
// Loads and stores less than 128-bits are already atomic; ones above that

0 commit comments

Comments
 (0)