1 ; RUN: llc < %s -march=sparcv9 -verify-machineinstrs | FileCheck %s
3 ; CHECK-LABEL: test_atomic_i64
9 ; CHECK: stx {{.+}}, [%o2]
10 define i64 @test_atomic_i64(i64* %ptr1, i64* %ptr2, i64* %ptr3) {
12 %0 = load atomic i64, i64* %ptr1 acquire, align 8
13 %1 = load atomic i64, i64* %ptr2 acquire, align 8
15 store atomic i64 %2, i64* %ptr3 release, align 8
19 ; CHECK-LABEL: test_cmpxchg_i64
20 ; CHECK: mov 123, [[R:%[gilo][0-7]]]
21 ; CHECK: casx [%o1], %o0, [[R]]
23 define i64 @test_cmpxchg_i64(i64 %a, i64* %ptr) {
25 %pair = cmpxchg i64* %ptr, i64 %a, i64 123 monotonic monotonic
26 %b = extractvalue { i64, i1 } %pair, 0
30 ; CHECK-LABEL: test_swap_i64
33 define i64 @test_swap_i64(i64 %a, i64* %ptr) {
35 %b = atomicrmw xchg i64* %ptr, i64 42 monotonic
39 ; CHECK-LABEL: test_load_sub_64
44 define zeroext i64 @test_load_sub_64(i64* %p, i64 zeroext %v) {
46 %0 = atomicrmw sub i64* %p, i64 %v seq_cst
50 ; CHECK-LABEL: test_load_max_64
56 define zeroext i64 @test_load_max_64(i64* %p, i64 zeroext %v) {
58 %0 = atomicrmw max i64* %p, i64 %v seq_cst