summaryrefslogtreecommitdiff
path: root/test/CodeGen/SPARC/atomics.ll
diff options
context:
space:
mode:
Diffstat (limited to 'test/CodeGen/SPARC/atomics.ll')
-rw-r--r--test/CodeGen/SPARC/atomics.ll9
1 files changed, 9 insertions, 0 deletions
diff --git a/test/CodeGen/SPARC/atomics.ll b/test/CodeGen/SPARC/atomics.ll
index 6d2b48287c..b10336c980 100644
--- a/test/CodeGen/SPARC/atomics.ll
+++ b/test/CodeGen/SPARC/atomics.ll
@@ -62,6 +62,15 @@ entry:
ret i32 %b
}
+; CHECK-LABEL: test_swap_i64
+; CHECK: casx [%o1],
+
+define i64 @test_swap_i64(i64 %a, i64* %ptr) {
+entry:
+ %b = atomicrmw xchg i64* %ptr, i64 42 monotonic
+ ret i64 %b
+}
+
; CHECK-LABEL: test_load_add_32
; CHECK: membar
; CHECK: add [[V:%[gilo][0-7]]], %o1, [[U:%[gilo][0-7]]]