aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/CodeGen/Atomics.c17
-rw-r--r--test/CodeGen/atomic.c6
-rw-r--r--test/CodeGenCXX/static-init.cpp4
3 files changed, 11 insertions, 16 deletions
diff --git a/test/CodeGen/Atomics.c b/test/CodeGen/Atomics.c
index e5a5812f46..c440b6c190 100644
--- a/test/CodeGen/Atomics.c
+++ b/test/CodeGen/Atomics.c
@@ -192,13 +192,12 @@ void test_lock (void)
__sync_synchronize (); // CHECK: fence seq_cst
- // FIXME: These are wrong!
- __sync_lock_release (&sc); // CHECK: store volatile
- __sync_lock_release (&uc); // CHECK: store volatile
- __sync_lock_release (&ss); // CHECK: store volatile
- __sync_lock_release (&us); // CHECK: store volatile
- __sync_lock_release (&si); // CHECK: store volatile
- __sync_lock_release (&ui); // CHECK: store volatile
- __sync_lock_release (&sll); // CHECK: store volatile
- __sync_lock_release (&ull); // CHECK: store volatile
+ __sync_lock_release (&sc); // CHECK: store atomic {{.*}} release, align 1
+ __sync_lock_release (&uc); // CHECK: store atomic {{.*}} release, align 1
+ __sync_lock_release (&ss); // CHECK: store atomic {{.*}} release, align 2
+ __sync_lock_release (&us); /// CHECK: store atomic {{.*}} release, align 2
+ __sync_lock_release (&si); // CHECK: store atomic {{.*}} release, align 4
+ __sync_lock_release (&ui); // CHECK: store atomic {{.*}} release, align 4
+ __sync_lock_release (&sll); // CHECK: store atomic {{.*}} release, align 8
+ __sync_lock_release (&ull); // CHECK: store atomic {{.*}} release, align 8
}
diff --git a/test/CodeGen/atomic.c b/test/CodeGen/atomic.c
index a0adac8e1c..c8f4fd09bb 100644
--- a/test/CodeGen/atomic.c
+++ b/test/CodeGen/atomic.c
@@ -75,8 +75,7 @@ int atomic(void) {
// CHECK: cmpxchg i32* null, i32 0, i32 0 seq_cst
__sync_lock_release(&val);
- // FIXME: WRONG!
- // CHECK: store volatile i32 0, i32*
+ // CHECK: store atomic {{.*}} release, align 4
__sync_synchronize ();
// CHECK: fence seq_cst
@@ -88,8 +87,7 @@ int atomic(void) {
void release_return(int *lock) {
// Ensure this is actually returning void all the way through.
return __sync_lock_release(lock);
- // FIXME: WRONG!
- // CHECK: store volatile i32 0, i32*
+ // CHECK: store atomic {{.*}} release, align 4
}
diff --git a/test/CodeGenCXX/static-init.cpp b/test/CodeGenCXX/static-init.cpp
index d488e63669..9e2673cc96 100644
--- a/test/CodeGenCXX/static-init.cpp
+++ b/test/CodeGenCXX/static-init.cpp
@@ -12,13 +12,11 @@ struct A {
};
void f() {
+ // CHECK: load atomic i8* bitcast (i64* @_ZGVZ1fvE1a to i8*) acquire, align 1
// CHECK: call i32 @__cxa_guard_acquire
// CHECK: call void @_ZN1AC1Ev
// CHECK: call i32 @__cxa_atexit(void (i8*)* bitcast (void (%struct.A*)* @_ZN1AD1Ev to void (i8*)*), i8* getelementptr inbounds (%struct.A* @_ZZ1fvE1a, i32 0, i32 0), i8* bitcast (i8** @__dso_handle to i8*))
// CHECK: call void @__cxa_guard_release
-
- // rdar://problem/9496726
- // CHECK: call void @llvm.memory.barrier(i1 true, i1 true, i1 false, i1 false, i1 false)
static A a;
}