1 # NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py
2 # RUN: llc -mtriple=aarch64-- -run-pass=instruction-select -verify-machineinstrs -global-isel-abort=1 %s -o - | FileCheck %s
5 name: truncstore_atomic_32
9 tracksRegLiveness: true
14 ; CHECK-LABEL: name: truncstore_atomic_32
16 ; CHECK-NEXT: successors: %bb.2(0x40000000), %bb.1(0x40000000)
17 ; CHECK-NEXT: liveins: $w1, $x0
19 ; CHECK-NEXT: [[COPY:%[0-9]+]]:gpr64sp = COPY $x0
20 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:gpr32 = COPY $w1
21 ; CHECK-NEXT: TBNZW [[COPY1]], 0, %bb.2
25 ; CHECK-NEXT: successors: %bb.2(0x80000000)
27 ; CHECK-NEXT: [[MOVi32imm:%[0-9]+]]:gpr32 = MOVi32imm 4
28 ; CHECK-NEXT: [[SUBREG_TO_REG:%[0-9]+]]:gpr64all = SUBREG_TO_REG 0, [[MOVi32imm]], %subreg.sub_32
29 ; CHECK-NEXT: [[COPY2:%[0-9]+]]:gpr32 = COPY [[SUBREG_TO_REG]].sub_32
30 ; CHECK-NEXT: STLRW [[COPY2]], [[COPY]] :: (store release (s32))
33 ; CHECK-NEXT: RET_ReallyLR
38 %3:gpr(s32) = COPY $w1
43 %8:gpr(s64) = G_CONSTANT i64 4
44 G_STORE %8(s64), %0(p0) :: (store release (s32))
51 name: truncstore_atomic_16
55 tracksRegLiveness: true
60 ; CHECK-LABEL: name: truncstore_atomic_16
62 ; CHECK-NEXT: successors: %bb.2(0x40000000), %bb.1(0x40000000)
63 ; CHECK-NEXT: liveins: $w1, $x0
65 ; CHECK-NEXT: [[COPY:%[0-9]+]]:gpr64sp = COPY $x0
66 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:gpr32 = COPY $w1
67 ; CHECK-NEXT: TBNZW [[COPY1]], 0, %bb.2
71 ; CHECK-NEXT: successors: %bb.2(0x80000000)
73 ; CHECK-NEXT: [[MOVi32imm:%[0-9]+]]:gpr32 = MOVi32imm 4
74 ; CHECK-NEXT: [[SUBREG_TO_REG:%[0-9]+]]:gpr64all = SUBREG_TO_REG 0, [[MOVi32imm]], %subreg.sub_32
75 ; CHECK-NEXT: [[COPY2:%[0-9]+]]:gpr32 = COPY [[SUBREG_TO_REG]].sub_32
76 ; CHECK-NEXT: STLRH [[COPY2]], [[COPY]] :: (store release (s16))
79 ; CHECK-NEXT: RET_ReallyLR
84 %3:gpr(s32) = COPY $w1
89 %8:gpr(s64) = G_CONSTANT i64 4
90 G_STORE %8(s64), %0(p0) :: (store release (s16))
97 name: truncstore_atomic_8
100 regBankSelected: true
101 tracksRegLiveness: true
106 ; CHECK-LABEL: name: truncstore_atomic_8
108 ; CHECK-NEXT: successors: %bb.2(0x40000000), %bb.1(0x40000000)
109 ; CHECK-NEXT: liveins: $w1, $x0
111 ; CHECK-NEXT: [[COPY:%[0-9]+]]:gpr64sp = COPY $x0
112 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:gpr32 = COPY $w1
113 ; CHECK-NEXT: TBNZW [[COPY1]], 0, %bb.2
114 ; CHECK-NEXT: B %bb.1
117 ; CHECK-NEXT: successors: %bb.2(0x80000000)
119 ; CHECK-NEXT: [[MOVi32imm:%[0-9]+]]:gpr32 = MOVi32imm 4
120 ; CHECK-NEXT: [[SUBREG_TO_REG:%[0-9]+]]:gpr64all = SUBREG_TO_REG 0, [[MOVi32imm]], %subreg.sub_32
121 ; CHECK-NEXT: [[COPY2:%[0-9]+]]:gpr32 = COPY [[SUBREG_TO_REG]].sub_32
122 ; CHECK-NEXT: STLRB [[COPY2]], [[COPY]] :: (store release (s8))
125 ; CHECK-NEXT: RET_ReallyLR
129 %0:gpr(p0) = COPY $x0
130 %3:gpr(s32) = COPY $w1
135 %8:gpr(s64) = G_CONSTANT i64 4
136 G_STORE %8(s64), %0(p0) :: (store release (s8))