diff options
Diffstat (limited to 'test/CodeGen/atomic.c')
-rw-r--r-- | test/CodeGen/atomic.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/test/CodeGen/atomic.c b/test/CodeGen/atomic.c index aa5aa1507b..8b66bfd660 100644 --- a/test/CodeGen/atomic.c +++ b/test/CodeGen/atomic.c @@ -1,5 +1,5 @@ // RUN: %clang_cc1 %s -emit-llvm -o - -triple=i686-apple-darwin9 > %t1 -// RUN: grep @llvm.memory.barrier %t1 | count 38 +// RUN: grep @llvm.memory.barrier %t1 | count 40 // 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 @@ -19,6 +19,7 @@ int atomic(void) int old; int val = 1; char valc = 1; + _Bool valb = 0; unsigned int uval = 1; int cmp = 0; @@ -43,6 +44,9 @@ int atomic(void) __sync_val_compare_and_swap((void **)0, (void *)0, (void *)0); + if ( __sync_val_compare_and_swap(&valb, 0, 1)) { + old = 42; + } __sync_lock_release(&val); |