summaryrefslogtreecommitdiffstats
path: root/clang/test/CodeGen/atomic-ops.c
diff options
context:
space:
mode:
authorRichard Smith <richard-llvm@metafoo.co.uk>2012-04-13 06:31:38 +0000
committerRichard Smith <richard-llvm@metafoo.co.uk>2012-04-13 06:31:38 +0000
commitd65cee9423e7e2362078bca9ada5fae735e84283 (patch)
tree30f273567f4bed880e34d67d68adac7ea9e018eb /clang/test/CodeGen/atomic-ops.c
parent374f19cade3c9ca8a9d008e2a9529376552dd93a (diff)
downloadbcm5719-llvm-d65cee9423e7e2362078bca9ada5fae735e84283.tar.gz
bcm5719-llvm-d65cee9423e7e2362078bca9ada5fae735e84283.zip
Implement __atomic_fetch_nand and __atomic_nand_fetch to complete our set of
GNU __atomic builtins. llvm-svn: 154659
Diffstat (limited to 'clang/test/CodeGen/atomic-ops.c')
-rw-r--r--clang/test/CodeGen/atomic-ops.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/clang/test/CodeGen/atomic-ops.c b/clang/test/CodeGen/atomic-ops.c
index a8de19d1b57..1a9ed36ee23 100644
--- a/clang/test/CodeGen/atomic-ops.c
+++ b/clang/test/CodeGen/atomic-ops.c
@@ -74,6 +74,21 @@ int fi3b(int *i) {
return __atomic_add_fetch(i, 1, memory_order_seq_cst);
}
+int fi3c(int *i) {
+ // CHECK: @fi3c
+ // CHECK: atomicrmw nand
+ // CHECK-NOT: and
+ return __atomic_fetch_nand(i, 1, memory_order_seq_cst);
+}
+
+int fi3d(int *i) {
+ // CHECK: @fi3d
+ // CHECK: atomicrmw nand
+ // CHECK: and
+ // CHECK: xor
+ return __atomic_nand_fetch(i, 1, memory_order_seq_cst);
+}
+
_Bool fi4(_Atomic(int) *i) {
// CHECK: @fi4
// CHECK: cmpxchg i32*
OpenPOWER on IntegriCloud