Skip to content

Commit dd6cb8c

Browse files
No changes necessary to AtomicExpandPass
1 parent 3722e80 commit dd6cb8c

File tree

1 file changed

+2
-9
lines changed

1 file changed

+2
-9
lines changed

llvm/lib/CodeGen/AtomicExpandPass.cpp

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -314,7 +314,6 @@ bool AtomicExpandImpl::processAtomicInstr(Instruction *I) {
314314

315315
if (TLI->shouldInsertFencesForAtomic(I)) {
316316
auto FenceOrdering = AtomicOrdering::Monotonic;
317-
SyncScope::ID SSID = SyncScope::System;
318317
if (LI && isAcquireOrStronger(LI->getOrdering())) {
319318
FenceOrdering = LI->getOrdering();
320319
LI->setOrdering(AtomicOrdering::Monotonic);
@@ -337,18 +336,13 @@ bool AtomicExpandImpl::processAtomicInstr(Instruction *I) {
337336
// expandAtomicCmpXchg in that case.
338337
FenceOrdering = CASI->getMergedOrdering();
339338
auto CASOrdering = TLI->atomicOperationOrderAfterFenceSplit(CASI);
340-
SSID = CASI->getSyncScopeID();
341339

342340
CASI->setSuccessOrdering(CASOrdering);
343341
CASI->setFailureOrdering(CASOrdering);
344-
// If CAS ordering is monotonic, then the operation will
345-
// take default scope. Otherwise, it will retain its scope
346-
if (CASOrdering != AtomicOrdering::Monotonic)
347-
CASI->setSyncScopeID(SSID);
348342
}
349343

350344
if (FenceOrdering != AtomicOrdering::Monotonic) {
351-
MadeChange |= bracketInstWithFences(I, FenceOrdering, SSID);
345+
MadeChange |= bracketInstWithFences(I, FenceOrdering);
352346
}
353347
} else if (I->hasAtomicStore() &&
354348
TLI->shouldInsertTrailingFenceForAtomicStore(I)) {
@@ -449,8 +443,7 @@ PreservedAnalyses AtomicExpandPass::run(Function &F,
449443
}
450444

451445
bool AtomicExpandImpl::bracketInstWithFences(Instruction *I,
452-
AtomicOrdering Order,
453-
SyncScope::ID SSID) {
446+
AtomicOrdering Order) {
454447
ReplacementIRBuilder Builder(I, *DL);
455448

456449
auto LeadingFence = TLI->emitLeadingFence(Builder, I, Order);

0 commit comments

Comments
 (0)