1 # NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py
2 # RUN: llc -mtriple=aarch64-unknown-unknown -run-pass=instruction-select -verify-machineinstrs %s -o - | FileCheck %s
5 define i32 @test_store_release_i64(i32 %a, i64* %addr) {
9 define i32 @test_store_release_i32(i32 %a, i64* %addr) {
14 name: test_store_release_i64
18 tracksRegLiveness: true
21 liveins: $w0, $x1, $x2
23 ; CHECK-LABEL: name: test_store_release_i64
24 ; CHECK: liveins: $w0, $x1, $x2
25 ; CHECK: [[COPY:%[0-9]+]]:gpr64 = COPY $x1
26 ; CHECK: [[COPY1:%[0-9]+]]:gpr64sp = COPY $x2
27 ; CHECK: early-clobber %2:gpr32 = STLXRX [[COPY]], [[COPY1]] :: (volatile store 8 into %ir.addr)
28 ; CHECK: $w0 = COPY %2
29 ; CHECK: RET_ReallyLR implicit $w0
30 %1:gpr(s64) = COPY $x1
32 %3:gpr(s32) = G_INTRINSIC_W_SIDE_EFFECTS intrinsic(@llvm.aarch64.stlxr), %1(s64), %2(p0) :: (volatile store 8 into %ir.addr)
34 RET_ReallyLR implicit $w0
38 name: test_store_release_i32
42 tracksRegLiveness: true
45 liveins: $w0, $w1, $x2
46 ; CHECK-LABEL: name: test_store_release_i32
47 ; CHECK: liveins: $w0, $w1, $x2
48 ; CHECK: [[COPY:%[0-9]+]]:gpr32 = COPY $w1
49 ; CHECK: [[COPY1:%[0-9]+]]:gpr64sp = COPY $x2
50 ; CHECK: early-clobber %3:gpr32 = STLXRW [[COPY]], [[COPY1]] :: (volatile store 4 into %ir.addr)
51 ; CHECK: $w0 = COPY %3
52 ; CHECK: RET_ReallyLR implicit $w0
53 %1:gpr(s32) = COPY $w1
55 %3:gpr(s64) = G_ZEXT %1(s32)
56 %4:gpr(s32) = G_INTRINSIC_W_SIDE_EFFECTS intrinsic(@llvm.aarch64.stlxr), %3(s64), %2(p0) :: (volatile store 4 into %ir.addr)
58 RET_ReallyLR implicit $w0