1 # NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py
2 # RUN: llc -mtriple=riscv32 -run-pass=instruction-select %s -o - \
3 # RUN: -disable-gisel-legality-check | FileCheck %s
9 tracksRegLiveness: true
12 liveins: $x10, $x11, $x11
14 ; CHECK-LABEL: name: store_i8
15 ; CHECK: liveins: $x10, $x11, $x11
17 ; CHECK-NEXT: [[COPY:%[0-9]+]]:gpr = COPY $x10
18 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:gpr = COPY $x11
19 ; CHECK-NEXT: SB [[COPY]], [[COPY1]], 0 :: (store (s8))
20 ; CHECK-NEXT: PseudoRET
21 %0:gprb(s32) = COPY $x10
22 %1:gprb(p0) = COPY $x11
23 G_STORE %0(s32), %1(p0) :: (store (s8))
31 tracksRegLiveness: true
36 ; CHECK-LABEL: name: store_i16
37 ; CHECK: liveins: $x10, $x11
39 ; CHECK-NEXT: [[COPY:%[0-9]+]]:gpr = COPY $x10
40 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:gpr = COPY $x11
41 ; CHECK-NEXT: SH [[COPY]], [[COPY1]], 0 :: (store (s16))
42 ; CHECK-NEXT: PseudoRET
43 %0:gprb(s32) = COPY $x10
44 %1:gprb(p0) = COPY $x11
45 G_STORE %0(s32), %1(p0) :: (store (s16))
53 tracksRegLiveness: true
58 ; CHECK-LABEL: name: store_i8_i16
59 ; CHECK: liveins: $x10, $x11
61 ; CHECK-NEXT: [[COPY:%[0-9]+]]:gpr = COPY $x10
62 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:gpr = COPY $x11
63 ; CHECK-NEXT: SB [[COPY]], [[COPY1]], 0 :: (store (s8))
64 ; CHECK-NEXT: PseudoRET
65 %0:gprb(s32) = COPY $x10
66 %1:gprb(p0) = COPY $x11
67 %2:gprb(s16) = G_TRUNC %0
68 G_STORE %2(s16), %1(p0) :: (store (s8))
76 tracksRegLiveness: true
81 ; CHECK-LABEL: name: store_i16_i16
82 ; CHECK: liveins: $x10, $x11
84 ; CHECK-NEXT: [[COPY:%[0-9]+]]:gpr = COPY $x10
85 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:gpr = COPY $x11
86 ; CHECK-NEXT: SH [[COPY]], [[COPY1]], 0 :: (store (s16))
87 ; CHECK-NEXT: PseudoRET
88 %0:gprb(s32) = COPY $x10
89 %1:gprb(p0) = COPY $x11
90 %2:gprb(s16) = G_TRUNC %0
91 G_STORE %2(s16), %1(p0) :: (store (s16))
99 tracksRegLiveness: true
104 ; CHECK-LABEL: name: store_i32
105 ; CHECK: liveins: $x10, $x11
107 ; CHECK-NEXT: [[COPY:%[0-9]+]]:gpr = COPY $x10
108 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:gpr = COPY $x11
109 ; CHECK-NEXT: SW [[COPY]], [[COPY1]], 0 :: (store (s32))
110 ; CHECK-NEXT: PseudoRET
111 %0:gprb(s32) = COPY $x10
112 %1:gprb(p0) = COPY $x11
113 G_STORE %0(s32), %1(p0) :: (store (s32))
120 regBankSelected: true
121 tracksRegLiveness: true
126 ; CHECK-LABEL: name: store_p0
127 ; CHECK: liveins: $x10, $x11
129 ; CHECK-NEXT: [[COPY:%[0-9]+]]:gpr = COPY $x10
130 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:gpr = COPY $x11
131 ; CHECK-NEXT: SW [[COPY]], [[COPY1]], 0 :: (store (p0))
132 ; CHECK-NEXT: PseudoRET
133 %0:gprb(p0) = COPY $x10
134 %1:gprb(p0) = COPY $x11
135 G_STORE %0(p0), %1(p0) :: (store (p0))
142 regBankSelected: true
143 tracksRegLiveness: true
146 - { id: 0, offset: 0, size: 4, alignment: 4 }
152 ; CHECK-LABEL: name: store_fi_i32
153 ; CHECK: liveins: $x10
155 ; CHECK-NEXT: [[COPY:%[0-9]+]]:gpr = COPY $x10
156 ; CHECK-NEXT: SW [[COPY]], %stack.0, 0 :: (store (s32))
157 ; CHECK-NEXT: PseudoRET
158 %0:gprb(s32) = COPY $x10
159 %1:gprb(p0) = G_FRAME_INDEX %stack.0
160 G_STORE %0(s32), %1(p0) :: (store (s32))
165 name: store_fi_gep_i32
167 regBankSelected: true
168 tracksRegLiveness: true
171 - { id: 0, offset: 0, size: 8, alignment: 4 }
177 ; CHECK-LABEL: name: store_fi_gep_i32
178 ; CHECK: liveins: $x10
180 ; CHECK-NEXT: [[COPY:%[0-9]+]]:gpr = COPY $x10
181 ; CHECK-NEXT: SW [[COPY]], %stack.0, 4 :: (store (s32))
182 ; CHECK-NEXT: PseudoRET
183 %0:gprb(s32) = COPY $x10
184 %1:gprb(p0) = G_FRAME_INDEX %stack.0
185 %2:gprb(s32) = G_CONSTANT i32 4
186 %3:gprb(p0) = G_PTR_ADD %1(p0), %2(s32)
187 G_STORE %0(s32), %3(p0) :: (store (s32))
194 regBankSelected: true
195 tracksRegLiveness: true
200 ; CHECK-LABEL: name: store_gep_i32
201 ; CHECK: liveins: $x10, $x11
203 ; CHECK-NEXT: [[COPY:%[0-9]+]]:gpr = COPY $x10
204 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:gpr = COPY $x11
205 ; CHECK-NEXT: SW [[COPY]], [[COPY1]], 4 :: (store (s32))
206 ; CHECK-NEXT: PseudoRET
207 %0:gprb(s32) = COPY $x10
208 %1:gprb(p0) = COPY $x11
209 %2:gprb(s32) = G_CONSTANT i32 4
210 %3:gprb(p0) = G_PTR_ADD %1(p0), %2(s32)
211 G_STORE %0(s32), %3(p0) :: (store (s32))