summaryrefslogtreecommitdiffstats
path: root/clang/test/CodeGen/atomic.c
diff options
context:
space:
mode:
authorDaniel Dunbar <daniel@zuster.org>2010-03-20 07:04:11 +0000
committerDaniel Dunbar <daniel@zuster.org>2010-03-20 07:04:11 +0000
commit4ff562d55704777485928eb7a11f4a68ee87196b (patch)
tree246af641e4523c58742ab4a5cbc611d79a75c2ad /clang/test/CodeGen/atomic.c
parent2497d85c9e2dd7573a16326f781fded0ad6056ff (diff)
downloadbcm5719-llvm-4ff562d55704777485928eb7a11f4a68ee87196b.tar.gz
bcm5719-llvm-4ff562d55704777485928eb7a11f4a68ee87196b.zip
IRgen: Wrap atomic intrinsics with memory barriers, to ensure we honor the semantics.
- This should be conservatively correct, we eventually should have target hooks for platforms that are less strict. llvm-svn: 99050
Diffstat (limited to 'clang/test/CodeGen/atomic.c')
-rw-r--r--clang/test/CodeGen/atomic.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/clang/test/CodeGen/atomic.c b/clang/test/CodeGen/atomic.c
index ff304f57f01..c201a1ad660 100644
--- a/clang/test/CodeGen/atomic.c
+++ b/clang/test/CodeGen/atomic.c
@@ -1,4 +1,5 @@
// RUN: %clang_cc1 %s -emit-llvm -o - -triple=i686-apple-darwin9 > %t1
+// RUN: grep @llvm.memory.barrier %t1 | count 42
// RUN: grep @llvm.atomic.load.add.i32 %t1 | count 3
// RUN: grep @llvm.atomic.load.sub.i8 %t1 | count 2
// RUN: grep @llvm.atomic.load.min.i32 %t1
OpenPOWER on IntegriCloud