summaryrefslogtreecommitdiffstats
path: root/clang/test/CodeGen/atomic-ops.c
diff options
context:
space:
mode:
Diffstat (limited to 'clang/test/CodeGen/atomic-ops.c')
-rw-r--r--clang/test/CodeGen/atomic-ops.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/clang/test/CodeGen/atomic-ops.c b/clang/test/CodeGen/atomic-ops.c
index db97706c5d4..500939f6fd7 100644
--- a/clang/test/CodeGen/atomic-ops.c
+++ b/clang/test/CodeGen/atomic-ops.c
@@ -183,6 +183,18 @@ 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
OpenPOWER on IntegriCloud