aboutsummaryrefslogtreecommitdiff
path: root/test/CodeGen/atomic.c
diff options
context:
space:
mode:
authorDimitry Andric <dim@FreeBSD.org>2012-04-14 14:01:31 +0000
committerDimitry Andric <dim@FreeBSD.org>2012-04-14 14:01:31 +0000
commitdbe13110f59f48b4dbb7552b3ac2935acdeece7f (patch)
treebe1815eb79b42ff482a8562b13c2dcbf0c5dcbee /test/CodeGen/atomic.c
parent9da628931ebf2609493570f87824ca22402cc65f (diff)
Notes
Diffstat (limited to 'test/CodeGen/atomic.c')
-rw-r--r--test/CodeGen/atomic.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/test/CodeGen/atomic.c b/test/CodeGen/atomic.c
index c8f4fd09bbc5..ac3848f02f9e 100644
--- a/test/CodeGen/atomic.c
+++ b/test/CodeGen/atomic.c
@@ -8,6 +8,7 @@ int atomic(void) {
_Bool valb = 0;
unsigned int uval = 1;
int cmp = 0;
+ int* ptrval;
old = __sync_fetch_and_add(&val, 1);
// CHECK: atomicrmw add i32* %val, i32 1 seq_cst
@@ -75,8 +76,11 @@ int atomic(void) {
// CHECK: cmpxchg i32* null, i32 0, i32 0 seq_cst
__sync_lock_release(&val);
- // CHECK: store atomic {{.*}} release, align 4
-
+ // CHECK: store atomic i32 0, {{.*}} release, align 4
+
+ __sync_lock_release(&ptrval);
+ // CHECK: store atomic i32 0, {{.*}} release, align 4
+
__sync_synchronize ();
// CHECK: fence seq_cst