1 # NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py
2 # RUN: llc -verify-machineinstrs -mtriple aarch64-unknown-unknown -run-pass=instruction-select %s -o - | FileCheck %s
8 tracksRegLiveness: true
13 ; CHECK-LABEL: name: v16s8_gpr
14 ; CHECK: liveins: $q1, $w0
15 ; CHECK: [[COPY:%[0-9]+]]:gpr32 = COPY $w0
16 ; CHECK: [[COPY1:%[0-9]+]]:fpr128 = COPY $q1
17 ; CHECK: [[INSvi8gpr:%[0-9]+]]:fpr128 = INSvi8gpr [[COPY1]], 1, [[COPY]]
18 ; CHECK: $q0 = COPY [[INSvi8gpr]]
19 ; CHECK: RET_ReallyLR implicit $q0
20 %0:gpr(s32) = COPY $w0
21 %trunc:gpr(s8) = G_TRUNC %0
22 %1:fpr(<16 x s8>) = COPY $q1
23 %3:gpr(s32) = G_CONSTANT i32 1
24 %2:fpr(<16 x s8>) = G_INSERT_VECTOR_ELT %1, %trunc:gpr(s8), %3:gpr(s32)
25 $q0 = COPY %2(<16 x s8>)
26 RET_ReallyLR implicit $q0
34 tracksRegLiveness: true
39 ; CHECK-LABEL: name: v8s8_gpr
40 ; CHECK: liveins: $d0, $w0
41 ; CHECK: [[COPY:%[0-9]+]]:gpr32 = COPY $w0
42 ; CHECK: [[COPY1:%[0-9]+]]:fpr64 = COPY $d0
43 ; CHECK: [[DEF:%[0-9]+]]:fpr128 = IMPLICIT_DEF
44 ; CHECK: [[INSERT_SUBREG:%[0-9]+]]:fpr128 = INSERT_SUBREG [[DEF]], [[COPY1]], %subreg.dsub
45 ; CHECK: [[INSvi8gpr:%[0-9]+]]:fpr128 = INSvi8gpr [[INSERT_SUBREG]], 1, [[COPY]]
46 ; CHECK: [[COPY2:%[0-9]+]]:fpr64 = COPY [[INSvi8gpr]].dsub
47 ; CHECK: $d0 = COPY [[COPY2]]
48 ; CHECK: RET_ReallyLR implicit $d0
49 %0:gpr(s32) = COPY $w0
50 %trunc:gpr(s8) = G_TRUNC %0
51 %1:fpr(<8 x s8>) = COPY $d0
52 %3:gpr(s32) = G_CONSTANT i32 1
53 %2:fpr(<8 x s8>) = G_INSERT_VECTOR_ELT %1, %trunc(s8), %3(s32)
54 $d0 = COPY %2(<8 x s8>)
55 RET_ReallyLR implicit $d0
63 tracksRegLiveness: true
68 ; CHECK-LABEL: name: v8s16_gpr
69 ; CHECK: liveins: $q1, $w0
70 ; CHECK: [[COPY:%[0-9]+]]:gpr32 = COPY $w0
71 ; CHECK: [[COPY1:%[0-9]+]]:fpr128 = COPY $q1
72 ; CHECK: [[INSvi16gpr:%[0-9]+]]:fpr128 = INSvi16gpr [[COPY1]], 1, [[COPY]]
73 ; CHECK: $q0 = COPY [[INSvi16gpr]]
74 ; CHECK: RET_ReallyLR implicit $q0
75 %0:gpr(s32) = COPY $w0
76 %trunc:gpr(s16) = G_TRUNC %0
77 %1:fpr(<8 x s16>) = COPY $q1
78 %3:gpr(s32) = G_CONSTANT i32 1
79 %2:fpr(<8 x s16>) = G_INSERT_VECTOR_ELT %1, %trunc:gpr(s16), %3:gpr(s32)
80 $q0 = COPY %2(<8 x s16>)
81 RET_ReallyLR implicit $q0
89 tracksRegLiveness: true
94 ; CHECK-LABEL: name: v8s16_fpr
95 ; CHECK: liveins: $q1, $h0
96 ; CHECK: [[COPY:%[0-9]+]]:fpr16 = COPY $h0
97 ; CHECK: [[COPY1:%[0-9]+]]:fpr128 = COPY $q1
98 ; CHECK: [[DEF:%[0-9]+]]:fpr128 = IMPLICIT_DEF
99 ; CHECK: [[INSERT_SUBREG:%[0-9]+]]:fpr128 = INSERT_SUBREG [[DEF]], [[COPY]], %subreg.hsub
100 ; CHECK: [[INSvi16lane:%[0-9]+]]:fpr128 = INSvi16lane [[COPY1]], 1, [[INSERT_SUBREG]], 0
101 ; CHECK: $q0 = COPY [[INSvi16lane]]
102 ; CHECK: RET_ReallyLR implicit $q0
103 %0:fpr(s16) = COPY $h0
104 %1:fpr(<8 x s16>) = COPY $q1
105 %3:gpr(s32) = G_CONSTANT i32 1
106 %2:fpr(<8 x s16>) = G_INSERT_VECTOR_ELT %1, %0(s16), %3(s32)
107 $q0 = COPY %2(<8 x s16>)
108 RET_ReallyLR implicit $q0
115 regBankSelected: true
116 tracksRegLiveness: true
121 ; CHECK-LABEL: name: v4s32_fpr
122 ; CHECK: liveins: $q1, $s0
123 ; CHECK: [[COPY:%[0-9]+]]:fpr32 = COPY $s0
124 ; CHECK: [[COPY1:%[0-9]+]]:fpr128 = COPY $q1
125 ; CHECK: [[DEF:%[0-9]+]]:fpr128 = IMPLICIT_DEF
126 ; CHECK: [[INSERT_SUBREG:%[0-9]+]]:fpr128 = INSERT_SUBREG [[DEF]], [[COPY]], %subreg.ssub
127 ; CHECK: [[INSvi32lane:%[0-9]+]]:fpr128 = INSvi32lane [[COPY1]], 1, [[INSERT_SUBREG]], 0
128 ; CHECK: $q0 = COPY [[INSvi32lane]]
129 ; CHECK: RET_ReallyLR implicit $q0
130 %0:fpr(s32) = COPY $s0
131 %1:fpr(<4 x s32>) = COPY $q1
132 %3:gpr(s32) = G_CONSTANT i32 1
133 %2:fpr(<4 x s32>) = G_INSERT_VECTOR_ELT %1, %0(s32), %3(s32)
134 $q0 = COPY %2(<4 x s32>)
135 RET_ReallyLR implicit $q0
142 regBankSelected: true
143 tracksRegLiveness: true
148 ; CHECK-LABEL: name: v4s32_gpr
149 ; CHECK: liveins: $q0, $w0
150 ; CHECK: [[COPY:%[0-9]+]]:gpr32 = COPY $w0
151 ; CHECK: [[COPY1:%[0-9]+]]:fpr128 = COPY $q0
152 ; CHECK: [[INSvi32gpr:%[0-9]+]]:fpr128 = INSvi32gpr [[COPY1]], 1, [[COPY]]
153 ; CHECK: $q0 = COPY [[INSvi32gpr]]
154 ; CHECK: RET_ReallyLR implicit $q0
155 %0:gpr(s32) = COPY $w0
156 %1:fpr(<4 x s32>) = COPY $q0
157 %3:gpr(s32) = G_CONSTANT i32 1
158 %2:fpr(<4 x s32>) = G_INSERT_VECTOR_ELT %1, %0(s32), %3(s32)
159 $q0 = COPY %2(<4 x s32>)
160 RET_ReallyLR implicit $q0
167 regBankSelected: true
168 tracksRegLiveness: true
173 ; CHECK-LABEL: name: v4s16_gpr
174 ; CHECK: liveins: $d0, $w0
175 ; CHECK: [[COPY:%[0-9]+]]:gpr32 = COPY $w0
176 ; CHECK: [[COPY1:%[0-9]+]]:fpr64 = COPY $d0
177 ; CHECK: [[DEF:%[0-9]+]]:fpr128 = IMPLICIT_DEF
178 ; CHECK: [[INSERT_SUBREG:%[0-9]+]]:fpr128 = INSERT_SUBREG [[DEF]], [[COPY1]], %subreg.dsub
179 ; CHECK: [[INSvi16gpr:%[0-9]+]]:fpr128 = INSvi16gpr [[INSERT_SUBREG]], 1, [[COPY]]
180 ; CHECK: [[COPY2:%[0-9]+]]:fpr64 = COPY [[INSvi16gpr]].dsub
181 ; CHECK: $d0 = COPY [[COPY2]]
182 ; CHECK: RET_ReallyLR implicit $d0
183 %0:gpr(s32) = COPY $w0
184 %trunc:gpr(s16) = G_TRUNC %0
185 %1:fpr(<4 x s16>) = COPY $d0
186 %3:gpr(s32) = G_CONSTANT i32 1
187 %2:fpr(<4 x s16>) = G_INSERT_VECTOR_ELT %1, %trunc(s16), %3(s32)
188 $d0 = COPY %2(<4 x s16>)
189 RET_ReallyLR implicit $d0
196 regBankSelected: true
197 tracksRegLiveness: true
202 ; CHECK-LABEL: name: v2s64_fpr
203 ; CHECK: liveins: $d0, $q1
204 ; CHECK: [[COPY:%[0-9]+]]:fpr64 = COPY $d0
205 ; CHECK: [[COPY1:%[0-9]+]]:fpr128 = COPY $q1
206 ; CHECK: [[DEF:%[0-9]+]]:fpr128 = IMPLICIT_DEF
207 ; CHECK: [[INSERT_SUBREG:%[0-9]+]]:fpr128 = INSERT_SUBREG [[DEF]], [[COPY]], %subreg.dsub
208 ; CHECK: [[INSvi64lane:%[0-9]+]]:fpr128 = INSvi64lane [[COPY1]], 1, [[INSERT_SUBREG]], 0
209 ; CHECK: $q0 = COPY [[INSvi64lane]]
210 ; CHECK: RET_ReallyLR implicit $q0
211 %0:fpr(s64) = COPY $d0
212 %1:fpr(<2 x s64>) = COPY $q1
213 %3:gpr(s32) = G_CONSTANT i32 1
214 %2:fpr(<2 x s64>) = G_INSERT_VECTOR_ELT %1, %0(s64), %3(s32)
215 $q0 = COPY %2(<2 x s64>)
216 RET_ReallyLR implicit $q0
223 regBankSelected: true
224 tracksRegLiveness: true
229 ; CHECK-LABEL: name: v2s64_gpr
230 ; CHECK: liveins: $q0, $x0
231 ; CHECK: [[COPY:%[0-9]+]]:gpr64 = COPY $x0
232 ; CHECK: [[COPY1:%[0-9]+]]:fpr128 = COPY $q0
233 ; CHECK: [[INSvi64gpr:%[0-9]+]]:fpr128 = INSvi64gpr [[COPY1]], 0, [[COPY]]
234 ; CHECK: $q0 = COPY [[INSvi64gpr]]
235 ; CHECK: RET_ReallyLR implicit $q0
236 %0:gpr(s64) = COPY $x0
237 %1:fpr(<2 x s64>) = COPY $q0
238 %3:gpr(s32) = G_CONSTANT i32 0
239 %2:fpr(<2 x s64>) = G_INSERT_VECTOR_ELT %1, %0(s64), %3(s32)
240 $q0 = COPY %2(<2 x s64>)
241 RET_ReallyLR implicit $q0
248 regBankSelected: true
249 tracksRegLiveness: true
254 ; CHECK-LABEL: name: v2s32_fpr
255 ; CHECK: liveins: $d1, $s0
256 ; CHECK: [[COPY:%[0-9]+]]:fpr32 = COPY $s0
257 ; CHECK: [[COPY1:%[0-9]+]]:fpr64 = COPY $d1
258 ; CHECK: [[DEF:%[0-9]+]]:fpr128 = IMPLICIT_DEF
259 ; CHECK: [[INSERT_SUBREG:%[0-9]+]]:fpr128 = INSERT_SUBREG [[DEF]], [[COPY1]], %subreg.dsub
260 ; CHECK: [[DEF1:%[0-9]+]]:fpr128 = IMPLICIT_DEF
261 ; CHECK: [[INSERT_SUBREG1:%[0-9]+]]:fpr128 = INSERT_SUBREG [[DEF1]], [[COPY]], %subreg.ssub
262 ; CHECK: [[INSvi32lane:%[0-9]+]]:fpr128 = INSvi32lane [[INSERT_SUBREG]], 1, [[INSERT_SUBREG1]], 0
263 ; CHECK: [[COPY2:%[0-9]+]]:fpr64 = COPY [[INSvi32lane]].dsub
264 ; CHECK: $d0 = COPY [[COPY2]]
265 ; CHECK: RET_ReallyLR implicit $d0
266 %0:fpr(s32) = COPY $s0
267 %1:fpr(<2 x s32>) = COPY $d1
268 %3:gpr(s32) = G_CONSTANT i32 1
269 %2:fpr(<2 x s32>) = G_INSERT_VECTOR_ELT %1, %0(s32), %3(s32)
270 $d0 = COPY %2(<2 x s32>)
271 RET_ReallyLR implicit $d0
278 regBankSelected: true
279 tracksRegLiveness: true
284 ; CHECK-LABEL: name: v2s32_gpr
285 ; CHECK: liveins: $d0, $w0
286 ; CHECK: [[COPY:%[0-9]+]]:gpr32 = COPY $w0
287 ; CHECK: [[COPY1:%[0-9]+]]:fpr64 = COPY $d0
288 ; CHECK: [[DEF:%[0-9]+]]:fpr128 = IMPLICIT_DEF
289 ; CHECK: [[INSERT_SUBREG:%[0-9]+]]:fpr128 = INSERT_SUBREG [[DEF]], [[COPY1]], %subreg.dsub
290 ; CHECK: [[INSvi32gpr:%[0-9]+]]:fpr128 = INSvi32gpr [[INSERT_SUBREG]], 1, [[COPY]]
291 ; CHECK: [[COPY2:%[0-9]+]]:fpr64 = COPY [[INSvi32gpr]].dsub
292 ; CHECK: $d0 = COPY [[COPY2]]
293 ; CHECK: RET_ReallyLR implicit $d0
294 %0:gpr(s32) = COPY $w0
295 %1:fpr(<2 x s32>) = COPY $d0
296 %3:gpr(s32) = G_CONSTANT i32 1
297 %2:fpr(<2 x s32>) = G_INSERT_VECTOR_ELT %1, %0(s32), %3(s32)
298 $d0 = COPY %2(<2 x s32>)
299 RET_ReallyLR implicit $d0