summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/ARM/ARMISelLowering.cpp
diff options
context:
space:
mode:
authorJim Grosbach <grosbach@apple.com>2010-06-23 16:08:49 +0000
committerJim Grosbach <grosbach@apple.com>2010-06-23 16:08:49 +0000
commita8ea498171c4360ec88f0721408b0f197e60d5c2 (patch)
treeb76f189dccfbbbf80e797c5da6e98b0aabcd97dd /llvm/lib/Target/ARM/ARMISelLowering.cpp
parentb58c08b0ba5d0163111d4b7454a3d968d86c3ece (diff)
downloadbcm5719-llvm-a8ea498171c4360ec88f0721408b0f197e60d5c2.tar.gz
bcm5719-llvm-a8ea498171c4360ec88f0721408b0f197e60d5c2.zip
When using libcall expansions for the atomic intrinsics, the explicit
MEMBARRIER fences aren't necessary for ARM. Tell the combiner to fold them away. llvm-svn: 106631
Diffstat (limited to 'llvm/lib/Target/ARM/ARMISelLowering.cpp')
-rw-r--r--llvm/lib/Target/ARM/ARMISelLowering.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/llvm/lib/Target/ARM/ARMISelLowering.cpp b/llvm/lib/Target/ARM/ARMISelLowering.cpp
index 7f89b2d1685..97a5f9da120 100644
--- a/llvm/lib/Target/ARM/ARMISelLowering.cpp
+++ b/llvm/lib/Target/ARM/ARMISelLowering.cpp
@@ -441,6 +441,8 @@ ARMTargetLowering::ARMTargetLowering(TargetMachine &TM)
setOperationAction(ISD::ATOMIC_LOAD_NAND, MVT::i8, Expand);
setOperationAction(ISD::ATOMIC_LOAD_NAND, MVT::i16, Expand);
setOperationAction(ISD::ATOMIC_LOAD_NAND, MVT::i32, Expand);
+ // Since the libcalls include locking, fold in the fences
+ setShouldFoldAtomicFences(true);
}
// 64-bit versions are always libcalls (for now)
setOperationAction(ISD::ATOMIC_CMP_SWAP, MVT::i64, Expand);
OpenPOWER on IntegriCloud