From d65cee9423e7e2362078bca9ada5fae735e84283 Mon Sep 17 00:00:00 2001 From: Richard Smith Date: Fri, 13 Apr 2012 06:31:38 +0000 Subject: Implement __atomic_fetch_nand and __atomic_nand_fetch to complete our set of GNU __atomic builtins. llvm-svn: 154659 --- clang/test/CodeGen/atomic-ops.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'clang/test/CodeGen/atomic-ops.c') 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* -- cgit v1.2.3