diff options
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; |