summaryrefslogtreecommitdiff
path: root/lib/Target/ARM64/ARM64TargetMachine.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Target/ARM64/ARM64TargetMachine.cpp')
-rw-r--r--lib/Target/ARM64/ARM64TargetMachine.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/Target/ARM64/ARM64TargetMachine.cpp b/lib/Target/ARM64/ARM64TargetMachine.cpp
index f4a7996379..946a0ee59e 100644
--- a/lib/Target/ARM64/ARM64TargetMachine.cpp
+++ b/lib/Target/ARM64/ARM64TargetMachine.cpp
@@ -111,6 +111,11 @@ bool ARM64PassConfig::addPreISel() {
addPass(createGlobalMergePass(TM));
if (TM->getOptLevel() != CodeGenOpt::None)
addPass(createARM64AddressTypePromotionPass());
+
+ // Always expand atomic operations, we don't deal with atomicrmw or cmpxchg
+ // ourselves.
+ addPass(createAtomicExpandLoadLinkedPass(TM));
+
return false;
}