summaryrefslogtreecommitdiff
path: root/test/CodeGen/atomic-ops.c
diff options
context:
space:
mode:
authorDimitry Andric <dim@FreeBSD.org>2015-06-09 19:08:19 +0000
committerDimitry Andric <dim@FreeBSD.org>2015-06-09 19:08:19 +0000
commit798321d8eb5630cd4a8f490a4f25e32ef195fb07 (patch)
treea59f5569ef36d00388c0428426abef26aa9105b6 /test/CodeGen/atomic-ops.c
parent5e20cdd81c44a443562a09007668ffdf76c455af (diff)
Diffstat (limited to 'test/CodeGen/atomic-ops.c')
-rw-r--r--test/CodeGen/atomic-ops.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/test/CodeGen/atomic-ops.c b/test/CodeGen/atomic-ops.c
index 733c60eb859c..13ab5f117f93 100644
--- a/test/CodeGen/atomic-ops.c
+++ b/test/CodeGen/atomic-ops.c
@@ -105,6 +105,14 @@ int fi3e(atomic_int *i) {
return atomic_fetch_or(i, 1);
}
+int fi3f(int *i) {
+ // CHECK-LABEL: @fi3f
+ // CHECK-NOT: store volatile
+ // CHECK: atomicrmw or
+ // CHECK-NOT: {{ or }}
+ return __atomic_fetch_or(i, (short)1, memory_order_seq_cst);
+}
+
_Bool fi4(_Atomic(int) *i) {
// CHECK-LABEL: @fi4(
// CHECK: [[PAIR:%[.0-9A-Z_a-z]+]] = cmpxchg i32* [[PTR:%[.0-9A-Z_a-z]+]], i32 [[EXPECTED:%[.0-9A-Z_a-z]+]], i32 [[DESIRED:%[.0-9A-Z_a-z]+]]