diff options
author | Dimitry Andric <dim@FreeBSD.org> | 2018-07-28 11:06:01 +0000 |
---|---|---|
committer | Dimitry Andric <dim@FreeBSD.org> | 2018-07-28 11:06:01 +0000 |
commit | 486754660bb926339aefcf012a3f848592babb8b (patch) | |
tree | ecdbc446c9876f4f120f701c243373cd3cb43db3 /test/CodeGen/atomic-ops.c | |
parent | 55e6d896ad333f07bb3b1ba487df214fc268a4ab (diff) |
Notes
Diffstat (limited to 'test/CodeGen/atomic-ops.c')
-rw-r--r-- | test/CodeGen/atomic-ops.c | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/test/CodeGen/atomic-ops.c b/test/CodeGen/atomic-ops.c index 1ebb2baa1ac64..500939f6fd75a 100644 --- a/test/CodeGen/atomic-ops.c +++ b/test/CodeGen/atomic-ops.c @@ -183,11 +183,23 @@ struct S { double x; }; +void implicit_store(_Atomic(struct S) *a, struct S s) { + // CHECK-LABEL: @implicit_store( + // CHECK: store atomic i64 %{{.*}}, i64* %{{.*}} seq_cst, align 8 + *a = s; +} + +struct S implicit_load(_Atomic(struct S) *a) { + // CHECK-LABEL: @implicit_load( + // CHECK: load atomic i64, i64* %{{.*}} seq_cst, align 8 + return *a; +} + struct S fd1(struct S *a) { // CHECK-LABEL: @fd1 // CHECK: [[RETVAL:%.*]] = alloca %struct.S, align 4 - // CHECK: [[RET:%.*]] = alloca %struct.S, align 4 - // CHECK: [[CAST:%.*]] = bitcast %struct.S* [[RET]] to i64* + // CHECK: bitcast %struct.S* {{.*}} to i64* + // CHECK: [[CAST:%.*]] = bitcast %struct.S* [[RETVAL]] to i64* // CHECK: [[CALL:%.*]] = call i64 @__atomic_load_8( // CHECK: store i64 [[CALL]], i64* [[CAST]], align 4 struct S ret; |