1 # NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py
2 # RUN: llc -run-pass=aarch64-mi-peephole-opt -mtriple=aarch64-unknown-linux -verify-machineinstrs -o - %s | FileCheck %s
4 define void @insert_vec_v6i64_uaddlv_from_v4i32(ptr %0) {
9 define void @insert_vec_v2i32_uaddlv_from_v8i16(ptr %0) {
14 define void @insert_vec_v8i16_uaddlv_from_v8i16(ptr %0) {
19 define void @insert_vec_v16i8_uaddlv_from_v4i32(ptr %0) {
24 define void @insert_vec_v2i32_uaddlv_from_v8i16_nz_index(ptr %0) {
29 ; The optimization is not applicable when the source is not a virtual register
30 define void @insert_vec_from_gpr(i32 %v, ptr %p) {
35 define void @fadd(double %v, double %p) {
40 define void @asm(ptr %hist) {
45 attributes #0 = { nocallback nofree nosync nounwind willreturn memory(none) }
49 name: insert_vec_v6i64_uaddlv_from_v4i32
51 - { id: 0, class: gpr64common, preferred-register: '' }
52 - { id: 1, class: fpr128, preferred-register: '' }
53 - { id: 2, class: fpr64, preferred-register: '' }
54 - { id: 3, class: fpr128, preferred-register: '' }
55 - { id: 4, class: fpr128, preferred-register: '' }
56 - { id: 5, class: gpr64, preferred-register: '' }
57 - { id: 6, class: fpr128, preferred-register: '' }
58 - { id: 7, class: fpr128, preferred-register: '' }
59 - { id: 8, class: fpr64, preferred-register: '' }
60 - { id: 9, class: fpr128, preferred-register: '' }
61 - { id: 10, class: fpr128, preferred-register: '' }
62 - { id: 11, class: fpr128, preferred-register: '' }
63 - { id: 12, class: fpr64, preferred-register: '' }
64 - { id: 13, class: fpr128, preferred-register: '' }
65 - { id: 14, class: fpr128, preferred-register: '' }
66 - { id: 15, class: fpr128, preferred-register: '' }
67 - { id: 16, class: gpr64all, preferred-register: '' }
68 - { id: 17, class: fpr64, preferred-register: '' }
70 - { reg: '$x0', virtual-reg: '%0' }
75 ; CHECK-LABEL: name: insert_vec_v6i64_uaddlv_from_v4i32
78 ; CHECK-NEXT: [[COPY:%[0-9]+]]:gpr64common = COPY $x0
79 ; CHECK-NEXT: [[MOVIv2d_ns:%[0-9]+]]:fpr128 = MOVIv2d_ns 0
80 ; CHECK-NEXT: [[UADDLVv4i32v:%[0-9]+]]:fpr64 = UADDLVv4i32v [[MOVIv2d_ns]]
81 ; CHECK-NEXT: [[DEF:%[0-9]+]]:fpr128 = IMPLICIT_DEF
82 ; CHECK-NEXT: [[INSERT_SUBREG:%[0-9]+]]:fpr128 = INSERT_SUBREG [[DEF]], killed [[UADDLVv4i32v]], %subreg.dsub
83 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:gpr64 = COPY [[INSERT_SUBREG]].dsub
84 ; CHECK-NEXT: [[INSvi64lane:%[0-9]+]]:fpr128 = INSvi64lane [[MOVIv2d_ns]], 0, [[INSERT_SUBREG]], 0
85 ; CHECK-NEXT: [[MOVID:%[0-9]+]]:fpr64 = MOVID 0
86 ; CHECK-NEXT: [[DEF1:%[0-9]+]]:fpr128 = IMPLICIT_DEF
87 ; CHECK-NEXT: [[INSERT_SUBREG1:%[0-9]+]]:fpr128 = INSERT_SUBREG [[DEF1]], killed [[MOVID]], %subreg.dsub
88 ; CHECK-NEXT: [[UCVTFv2f64_:%[0-9]+]]:fpr128 = nofpexcept UCVTFv2f64 killed [[INSvi64lane]], implicit $fpcr
89 ; CHECK-NEXT: [[FCVTNv2i32_:%[0-9]+]]:fpr64 = nofpexcept FCVTNv2i32 killed [[UCVTFv2f64_]], implicit $fpcr
90 ; CHECK-NEXT: [[DEF2:%[0-9]+]]:fpr128 = IMPLICIT_DEF
91 ; CHECK-NEXT: [[INSERT_SUBREG2:%[0-9]+]]:fpr128 = INSERT_SUBREG [[DEF2]], killed [[FCVTNv2i32_]], %subreg.dsub
92 ; CHECK-NEXT: [[COPY2:%[0-9]+]]:fpr64 = COPY [[MOVIv2d_ns]].dsub
93 ; CHECK-NEXT: STRDui killed [[COPY2]], [[COPY]], 2 :: (store (s64) into %ir.0 + 16)
94 ; CHECK-NEXT: STRQui killed [[INSERT_SUBREG2]], [[COPY]], 0 :: (store (s128) into %ir.0, align 8)
95 ; CHECK-NEXT: RET_ReallyLR
96 %0:gpr64common = COPY $x0
97 %1:fpr128 = MOVIv2d_ns 0
98 %2:fpr64 = UADDLVv4i32v %1
99 %4:fpr128 = IMPLICIT_DEF
100 %3:fpr128 = INSERT_SUBREG %4, killed %2, %subreg.dsub
101 %5:gpr64 = COPY %3.dsub
102 %7:fpr128 = INSvi64gpr %1, 0, killed %5
104 %10:fpr128 = IMPLICIT_DEF
105 %9:fpr128 = INSERT_SUBREG %10, killed %8, %subreg.dsub
106 %11:fpr128 = nofpexcept UCVTFv2f64 killed %7, implicit $fpcr
107 %12:fpr64 = nofpexcept FCVTNv2i32 killed %11, implicit $fpcr
108 %14:fpr128 = IMPLICIT_DEF
109 %13:fpr128 = INSERT_SUBREG %14, killed %12, %subreg.dsub
110 %15:fpr128 = INSvi64lane %13, 1, killed %9, 0
111 %17:fpr64 = COPY %1.dsub
112 STRDui killed %17, %0, 2 :: (store (s64) into %ir.0 + 16)
113 STRQui killed %15, %0, 0 :: (store (s128) into %ir.0, align 8)
118 name: insert_vec_v2i32_uaddlv_from_v8i16
120 - { id: 0, class: gpr64common, preferred-register: '' }
121 - { id: 1, class: fpr128, preferred-register: '' }
122 - { id: 2, class: fpr32, preferred-register: '' }
123 - { id: 3, class: fpr128, preferred-register: '' }
124 - { id: 4, class: fpr128, preferred-register: '' }
125 - { id: 5, class: gpr32, preferred-register: '' }
126 - { id: 6, class: fpr64, preferred-register: '' }
127 - { id: 7, class: fpr128, preferred-register: '' }
128 - { id: 8, class: fpr128, preferred-register: '' }
129 - { id: 9, class: fpr128, preferred-register: '' }
130 - { id: 10, class: fpr64, preferred-register: '' }
131 - { id: 11, class: fpr64, preferred-register: '' }
133 - { reg: '$x0', virtual-reg: '%0' }
138 ; CHECK-LABEL: name: insert_vec_v2i32_uaddlv_from_v8i16
139 ; CHECK: liveins: $x0
141 ; CHECK-NEXT: [[COPY:%[0-9]+]]:gpr64common = COPY $x0
142 ; CHECK-NEXT: [[MOVIv2d_ns:%[0-9]+]]:fpr128 = MOVIv2d_ns 0
143 ; CHECK-NEXT: [[UADDLVv8i16v:%[0-9]+]]:fpr32 = UADDLVv8i16v killed [[MOVIv2d_ns]]
144 ; CHECK-NEXT: [[DEF:%[0-9]+]]:fpr128 = IMPLICIT_DEF
145 ; CHECK-NEXT: [[INSERT_SUBREG:%[0-9]+]]:fpr128 = INSERT_SUBREG [[DEF]], killed [[UADDLVv8i16v]], %subreg.ssub
146 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:gpr32 = COPY [[INSERT_SUBREG]].ssub
147 ; CHECK-NEXT: [[MOVID:%[0-9]+]]:fpr64 = MOVID 0
148 ; CHECK-NEXT: [[DEF1:%[0-9]+]]:fpr128 = IMPLICIT_DEF
149 ; CHECK-NEXT: [[INSERT_SUBREG1:%[0-9]+]]:fpr128 = INSERT_SUBREG [[DEF1]], killed [[MOVID]], %subreg.dsub
150 ; CHECK-NEXT: [[INSvi32lane:%[0-9]+]]:fpr128 = INSvi32lane [[INSERT_SUBREG1]], 0, [[INSERT_SUBREG]], 0
151 ; CHECK-NEXT: [[COPY2:%[0-9]+]]:fpr64 = COPY [[INSvi32lane]].dsub
152 ; CHECK-NEXT: [[UCVTFv2f32_:%[0-9]+]]:fpr64 = nofpexcept UCVTFv2f32 killed [[COPY2]], implicit $fpcr
153 ; CHECK-NEXT: STRDui killed [[UCVTFv2f32_]], [[COPY]], 0 :: (store (s64) into %ir.0)
154 ; CHECK-NEXT: RET_ReallyLR
155 %0:gpr64common = COPY $x0
156 %1:fpr128 = MOVIv2d_ns 0
157 %2:fpr32 = UADDLVv8i16v killed %1
158 %4:fpr128 = IMPLICIT_DEF
159 %3:fpr128 = INSERT_SUBREG %4, killed %2, %subreg.ssub
160 %5:gpr32 = COPY %3.ssub
162 %8:fpr128 = IMPLICIT_DEF
163 %7:fpr128 = INSERT_SUBREG %8, killed %6, %subreg.dsub
164 %9:fpr128 = INSvi32gpr %7, 0, killed %5
165 %10:fpr64 = COPY %9.dsub
166 %11:fpr64 = nofpexcept UCVTFv2f32 killed %10, implicit $fpcr
167 STRDui killed %11, %0, 0 :: (store (s64) into %ir.0)
172 name: insert_vec_v8i16_uaddlv_from_v8i16
174 - { id: 0, class: gpr64common, preferred-register: '' }
175 - { id: 1, class: fpr128, preferred-register: '' }
176 - { id: 2, class: fpr32, preferred-register: '' }
177 - { id: 3, class: fpr128, preferred-register: '' }
178 - { id: 4, class: fpr128, preferred-register: '' }
179 - { id: 5, class: gpr32, preferred-register: '' }
180 - { id: 6, class: fpr64, preferred-register: '' }
181 - { id: 7, class: fpr128, preferred-register: '' }
182 - { id: 8, class: fpr128, preferred-register: '' }
183 - { id: 9, class: fpr128, preferred-register: '' }
184 - { id: 10, class: fpr64, preferred-register: '' }
185 - { id: 11, class: fpr128, preferred-register: '' }
186 - { id: 12, class: fpr128, preferred-register: '' }
187 - { id: 13, class: gpr32, preferred-register: '' }
189 - { reg: '$x0', virtual-reg: '%0' }
194 ; CHECK-LABEL: name: insert_vec_v8i16_uaddlv_from_v8i16
195 ; CHECK: liveins: $x0
197 ; CHECK-NEXT: [[COPY:%[0-9]+]]:gpr64common = COPY $x0
198 ; CHECK-NEXT: [[MOVIv2d_ns:%[0-9]+]]:fpr128 = MOVIv2d_ns 0
199 ; CHECK-NEXT: [[UADDLVv8i16v:%[0-9]+]]:fpr32 = UADDLVv8i16v killed [[MOVIv2d_ns]]
200 ; CHECK-NEXT: [[DEF:%[0-9]+]]:fpr128 = IMPLICIT_DEF
201 ; CHECK-NEXT: [[INSERT_SUBREG:%[0-9]+]]:fpr128 = INSERT_SUBREG [[DEF]], killed [[UADDLVv8i16v]], %subreg.ssub
202 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:gpr32 = COPY [[INSERT_SUBREG]].ssub
203 ; CHECK-NEXT: [[MOVID:%[0-9]+]]:fpr64 = MOVID 0
204 ; CHECK-NEXT: [[DEF1:%[0-9]+]]:fpr128 = IMPLICIT_DEF
205 ; CHECK-NEXT: [[INSERT_SUBREG1:%[0-9]+]]:fpr128 = INSERT_SUBREG [[DEF1]], killed [[MOVID]], %subreg.dsub
206 ; CHECK-NEXT: [[INSvi16lane:%[0-9]+]]:fpr128 = INSvi16lane [[INSERT_SUBREG1]], 0, [[INSERT_SUBREG]], 0
207 ; CHECK-NEXT: [[COPY2:%[0-9]+]]:fpr64 = COPY [[INSvi16lane]].dsub
208 ; CHECK-NEXT: [[USHLLv4i16_shift:%[0-9]+]]:fpr128 = USHLLv4i16_shift killed [[COPY2]], 0
209 ; CHECK-NEXT: [[UCVTFv4f32_:%[0-9]+]]:fpr128 = nofpexcept UCVTFv4f32 killed [[USHLLv4i16_shift]], implicit $fpcr
210 ; CHECK-NEXT: [[COPY3:%[0-9]+]]:gpr32 = COPY $wzr
211 ; CHECK-NEXT: STRWui [[COPY3]], [[COPY]], 7 :: (store (s32) into %ir.0 + 28)
212 ; CHECK-NEXT: STRWui [[COPY3]], [[COPY]], 6 :: (store (s32) into %ir.0 + 24, align 8)
213 ; CHECK-NEXT: STRWui [[COPY3]], [[COPY]], 5 :: (store (s32) into %ir.0 + 20)
214 ; CHECK-NEXT: STRWui [[COPY3]], [[COPY]], 4 :: (store (s32) into %ir.0 + 16, align 8)
215 ; CHECK-NEXT: STRQui killed [[UCVTFv4f32_]], [[COPY]], 0 :: (store (s128) into %ir.0, align 8)
216 ; CHECK-NEXT: RET_ReallyLR
217 %0:gpr64common = COPY $x0
218 %1:fpr128 = MOVIv2d_ns 0
219 %2:fpr32 = UADDLVv8i16v killed %1
220 %4:fpr128 = IMPLICIT_DEF
221 %3:fpr128 = INSERT_SUBREG %4, killed %2, %subreg.ssub
222 %5:gpr32 = COPY %3.ssub
224 %8:fpr128 = IMPLICIT_DEF
225 %7:fpr128 = INSERT_SUBREG %8, killed %6, %subreg.dsub
226 %9:fpr128 = INSvi16gpr %7, 0, killed %5
227 %10:fpr64 = COPY %9.dsub
228 %11:fpr128 = USHLLv4i16_shift killed %10, 0
229 %12:fpr128 = nofpexcept UCVTFv4f32 killed %11, implicit $fpcr
230 %13:gpr32 = COPY $wzr
231 STRWui %13, %0, 7 :: (store (s32) into %ir.0 + 28)
232 STRWui %13, %0, 6 :: (store (s32) into %ir.0 + 24, align 8)
233 STRWui %13, %0, 5 :: (store (s32) into %ir.0 + 20)
234 STRWui %13, %0, 4 :: (store (s32) into %ir.0 + 16, align 8)
235 STRQui killed %12, %0, 0 :: (store (s128) into %ir.0, align 8)
240 name: insert_vec_v16i8_uaddlv_from_v4i32
242 - { id: 0, class: gpr64common, preferred-register: '' }
243 - { id: 1, class: fpr128, preferred-register: '' }
244 - { id: 2, class: fpr64, preferred-register: '' }
245 - { id: 3, class: fpr128, preferred-register: '' }
246 - { id: 4, class: fpr128, preferred-register: '' }
247 - { id: 5, class: gpr64all, preferred-register: '' }
248 - { id: 6, class: gpr32, preferred-register: '' }
249 - { id: 7, class: fpr64, preferred-register: '' }
250 - { id: 8, class: fpr128, preferred-register: '' }
251 - { id: 9, class: fpr128, preferred-register: '' }
252 - { id: 10, class: fpr128, preferred-register: '' }
253 - { id: 11, class: fpr64, preferred-register: '' }
254 - { id: 12, class: fpr64, preferred-register: '' }
255 - { id: 13, class: fpr64, preferred-register: '' }
256 - { id: 14, class: fpr64, preferred-register: '' }
257 - { id: 15, class: fpr128, preferred-register: '' }
258 - { id: 16, class: fpr128, preferred-register: '' }
259 - { id: 17, class: fpr128, preferred-register: '' }
261 - { reg: '$x0', virtual-reg: '%0' }
266 ; CHECK-LABEL: name: insert_vec_v16i8_uaddlv_from_v4i32
267 ; CHECK: liveins: $x0
269 ; CHECK-NEXT: [[COPY:%[0-9]+]]:gpr64common = COPY $x0
270 ; CHECK-NEXT: [[MOVIv2d_ns:%[0-9]+]]:fpr128 = MOVIv2d_ns 0
271 ; CHECK-NEXT: [[UADDLVv4i32v:%[0-9]+]]:fpr64 = UADDLVv4i32v [[MOVIv2d_ns]]
272 ; CHECK-NEXT: [[DEF:%[0-9]+]]:fpr128 = IMPLICIT_DEF
273 ; CHECK-NEXT: [[INSERT_SUBREG:%[0-9]+]]:fpr128 = INSERT_SUBREG [[DEF]], killed [[UADDLVv4i32v]], %subreg.dsub
274 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:gpr64all = COPY [[INSERT_SUBREG]].dsub
275 ; CHECK-NEXT: [[COPY2:%[0-9]+]]:gpr32 = COPY [[COPY1]].sub_32
276 ; CHECK-NEXT: [[MOVID:%[0-9]+]]:fpr64 = MOVID 0
277 ; CHECK-NEXT: [[DEF1:%[0-9]+]]:fpr128 = IMPLICIT_DEF
278 ; CHECK-NEXT: [[INSERT_SUBREG1:%[0-9]+]]:fpr128 = INSERT_SUBREG [[DEF1]], killed [[MOVID]], %subreg.dsub
279 ; CHECK-NEXT: [[INSvi8lane:%[0-9]+]]:fpr128 = INSvi8lane [[INSERT_SUBREG1]], 0, [[INSERT_SUBREG]], 0
280 ; CHECK-NEXT: [[COPY3:%[0-9]+]]:fpr64 = COPY [[INSvi8lane]].dsub
281 ; CHECK-NEXT: [[DEF2:%[0-9]+]]:fpr64 = IMPLICIT_DEF
282 ; CHECK-NEXT: [[ZIP1v8i8_:%[0-9]+]]:fpr64 = ZIP1v8i8 killed [[COPY3]], killed [[DEF2]]
283 ; CHECK-NEXT: [[BICv4i16_:%[0-9]+]]:fpr64 = BICv4i16 [[ZIP1v8i8_]], 255, 8
284 ; CHECK-NEXT: [[USHLLv4i16_shift:%[0-9]+]]:fpr128 = USHLLv4i16_shift killed [[BICv4i16_]], 0
285 ; CHECK-NEXT: [[UCVTFv4f32_:%[0-9]+]]:fpr128 = nofpexcept UCVTFv4f32 killed [[USHLLv4i16_shift]], implicit $fpcr
286 ; CHECK-NEXT: STRQui [[MOVIv2d_ns]], [[COPY]], 3 :: (store (s128) into %ir.0 + 48, align 8)
287 ; CHECK-NEXT: STRQui [[MOVIv2d_ns]], [[COPY]], 2 :: (store (s128) into %ir.0 + 32, align 8)
288 ; CHECK-NEXT: STRQui [[MOVIv2d_ns]], [[COPY]], 1 :: (store (s128) into %ir.0 + 16, align 8)
289 ; CHECK-NEXT: STRQui killed [[UCVTFv4f32_]], [[COPY]], 0 :: (store (s128) into %ir.0, align 8)
290 ; CHECK-NEXT: RET_ReallyLR
291 %0:gpr64common = COPY $x0
292 %1:fpr128 = MOVIv2d_ns 0
293 %2:fpr64 = UADDLVv4i32v %1
294 %4:fpr128 = IMPLICIT_DEF
295 %3:fpr128 = INSERT_SUBREG %4, killed %2, %subreg.dsub
296 %5:gpr64all = COPY %3.dsub
297 %6:gpr32 = COPY %5.sub_32
299 %9:fpr128 = IMPLICIT_DEF
300 %8:fpr128 = INSERT_SUBREG %9, killed %7, %subreg.dsub
301 %10:fpr128 = INSvi8gpr %8, 0, killed %6
302 %11:fpr64 = COPY %10.dsub
303 %13:fpr64 = IMPLICIT_DEF
304 %12:fpr64 = ZIP1v8i8 killed %11, killed %13
305 %14:fpr64 = BICv4i16 %12, 255, 8
306 %15:fpr128 = USHLLv4i16_shift killed %14, 0
307 %16:fpr128 = nofpexcept UCVTFv4f32 killed %15, implicit $fpcr
308 STRQui %1, %0, 3 :: (store (s128) into %ir.0 + 48, align 8)
309 STRQui %1, %0, 2 :: (store (s128) into %ir.0 + 32, align 8)
310 STRQui %1, %0, 1 :: (store (s128) into %ir.0 + 16, align 8)
311 STRQui killed %16, %0, 0 :: (store (s128) into %ir.0, align 8)
316 name: insert_vec_v2i32_uaddlv_from_v8i16_nz_index
318 - { id: 0, class: gpr64common, preferred-register: '' }
319 - { id: 1, class: fpr128, preferred-register: '' }
320 - { id: 2, class: fpr32, preferred-register: '' }
321 - { id: 3, class: fpr128, preferred-register: '' }
322 - { id: 4, class: fpr128, preferred-register: '' }
323 - { id: 5, class: gpr32, preferred-register: '' }
324 - { id: 6, class: fpr128, preferred-register: '' }
325 - { id: 7, class: fpr128, preferred-register: '' }
326 - { id: 8, class: fpr128, preferred-register: '' }
328 - { reg: '$x0', virtual-reg: '%0' }
333 ; CHECK-LABEL: name: insert_vec_v2i32_uaddlv_from_v8i16_nz_index
334 ; CHECK: liveins: $x0
336 ; CHECK-NEXT: [[COPY:%[0-9]+]]:gpr64common = COPY $x0
337 ; CHECK-NEXT: [[MOVIv2d_ns:%[0-9]+]]:fpr128 = MOVIv2d_ns 0
338 ; CHECK-NEXT: [[UADDLVv8i16v:%[0-9]+]]:fpr32 = UADDLVv8i16v [[MOVIv2d_ns]]
339 ; CHECK-NEXT: [[DEF:%[0-9]+]]:fpr128 = IMPLICIT_DEF
340 ; CHECK-NEXT: [[INSERT_SUBREG:%[0-9]+]]:fpr128 = INSERT_SUBREG [[DEF]], killed [[UADDLVv8i16v]], %subreg.ssub
341 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:gpr32 = COPY [[INSERT_SUBREG]].ssub
342 ; CHECK-NEXT: [[INSvi32lane:%[0-9]+]]:fpr128 = INSvi32lane [[MOVIv2d_ns]], 2, [[INSERT_SUBREG]], 0
343 ; CHECK-NEXT: [[UCVTFv4f32_:%[0-9]+]]:fpr128 = nofpexcept UCVTFv4f32 killed [[INSvi32lane]], implicit $fpcr
344 ; CHECK-NEXT: STRQui killed [[UCVTFv4f32_]], [[COPY]], 0 :: (store (s128) into %ir.0, align 8)
345 ; CHECK-NEXT: RET_ReallyLR
346 %0:gpr64common = COPY $x0
347 %1:fpr128 = MOVIv2d_ns 0
348 %2:fpr32 = UADDLVv8i16v %1
349 %4:fpr128 = IMPLICIT_DEF
350 %3:fpr128 = INSERT_SUBREG %4, killed %2, %subreg.ssub
351 %5:gpr32 = COPY %3.ssub
352 %7:fpr128 = INSvi32gpr %1, 2, killed %5
353 %8:fpr128 = nofpexcept UCVTFv4f32 killed %7, implicit $fpcr
354 STRQui killed %8, %0, 0 :: (store (s128) into %ir.0, align 8)
359 name: insert_vec_from_gpr
361 - { id: 0, class: gpr32, preferred-register: '' }
362 - { id: 1, class: gpr64common, preferred-register: '' }
363 - { id: 2, class: gpr64, preferred-register: '' }
364 - { id: 3, class: gpr64all, preferred-register: '' }
365 - { id: 4, class: gpr64common, preferred-register: '' }
366 - { id: 5, class: gpr64common, preferred-register: '' }
367 - { id: 6, class: fpr128, preferred-register: '' }
368 - { id: 7, class: fpr128, preferred-register: '' }
370 - { reg: '$w0', virtual-reg: '%0' }
371 - { reg: '$x1', virtual-reg: '%1' }
373 - { id: 0, name: '', type: default, offset: 0, size: 16, alignment: 16,
374 stack-id: default, callee-saved-register: '', callee-saved-restored: true,
375 local-offset: -16, debug-info-variable: '', debug-info-expression: '',
376 debug-info-location: '' }
381 ; CHECK-LABEL: name: insert_vec_from_gpr
382 ; CHECK: liveins: $w0, $x1
384 ; CHECK-NEXT: [[COPY:%[0-9]+]]:gpr64common = COPY $x1
385 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:gpr32 = COPY $w0
386 ; CHECK-NEXT: [[DEF:%[0-9]+]]:gpr64all = IMPLICIT_DEF
387 ; CHECK-NEXT: [[INSERT_SUBREG:%[0-9]+]]:gpr64 = INSERT_SUBREG [[DEF]], [[COPY1]], %subreg.sub_32
388 ; CHECK-NEXT: [[ADDXri:%[0-9]+]]:gpr64common = ADDXri %stack.0, 0, 0
389 ; CHECK-NEXT: [[BFMXri:%[0-9]+]]:gpr64common = BFMXri [[ADDXri]], killed [[INSERT_SUBREG]], 62, 1
390 ; CHECK-NEXT: STRWui [[COPY1]], killed [[BFMXri]], 0 :: (store (s32))
391 ; CHECK-NEXT: [[LDRQui:%[0-9]+]]:fpr128 = LDRQui %stack.0, 0 :: (load (s128) from %stack.0)
392 ; CHECK-NEXT: [[INSvi32gpr:%[0-9]+]]:fpr128 = INSvi32gpr [[LDRQui]], 1, [[COPY1]]
393 ; CHECK-NEXT: STRQui killed [[INSvi32gpr]], [[COPY]], 0 :: (store (s128) into %ir.p, align 4)
394 ; CHECK-NEXT: RET_ReallyLR
395 %1:gpr64common = COPY $x1
397 %3:gpr64all = IMPLICIT_DEF
398 %2:gpr64 = INSERT_SUBREG %3, %0, %subreg.sub_32
399 %4:gpr64common = ADDXri %stack.0, 0, 0
400 %5:gpr64common = BFMXri %4, killed %2, 62, 1
401 STRWui %0, killed %5, 0 :: (store (s32))
402 %6:fpr128 = LDRQui %stack.0, 0 :: (load (s128) from %stack.0)
403 %7:fpr128 = INSvi32gpr %6, 1, %0
404 STRQui killed %7, %1, 0 :: (store (s128) into %ir.p, align 4)
411 tracksRegLiveness: true
413 - { id: 0, class: fpr64, preferred-register: '' }
414 - { id: 1, class: fpr64, preferred-register: '' }
415 - { id: 2, class: fpr64, preferred-register: '' }
416 - { id: 3, class: fpr128, preferred-register: '' }
417 - { id: 4, class: fpr64, preferred-register: '' }
418 - { id: 5, class: fpr128, preferred-register: '' }
419 - { id: 6, class: fpr128, preferred-register: '' }
420 - { id: 7, class: fpr128, preferred-register: '' }
421 - { id: 8, class: fpr128, preferred-register: '' }
422 - { id: 9, class: fpr128, preferred-register: '' }
424 - { reg: '$d0', virtual-reg: '%0' }
425 - { reg: '$d1', virtual-reg: '%1' }
430 ; CHECK-LABEL: name: fadd
431 ; CHECK: liveins: $d0, $d1
433 ; CHECK-NEXT: [[COPY:%[0-9]+]]:fpr64 = COPY $d1
434 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:fpr64 = COPY $d0
435 ; CHECK-NEXT: [[FADDDrr:%[0-9]+]]:fpr64 = nofpexcept FADDDrr [[COPY1]], [[COPY]], implicit $fpcr
436 ; CHECK-NEXT: [[MOVIv2d_ns:%[0-9]+]]:fpr128 = MOVIv2d_ns 0
437 ; CHECK-NEXT: [[COPY2:%[0-9]+]]:fpr64 = COPY [[MOVIv2d_ns]].dsub
438 ; CHECK-NEXT: [[DEF:%[0-9]+]]:fpr128 = IMPLICIT_DEF
439 ; CHECK-NEXT: [[INSERT_SUBREG:%[0-9]+]]:fpr128 = INSERT_SUBREG [[DEF]], killed [[COPY2]], %subreg.dsub
440 ; CHECK-NEXT: [[DEF1:%[0-9]+]]:fpr128 = IMPLICIT_DEF
441 ; CHECK-NEXT: [[INSERT_SUBREG1:%[0-9]+]]:fpr128 = INSERT_SUBREG [[DEF1]], killed [[FADDDrr]], %subreg.dsub
442 ; CHECK-NEXT: $q0 = COPY [[INSERT_SUBREG1]]
443 ; CHECK-NEXT: RET_ReallyLR implicit $q0
446 %2:fpr64 = nofpexcept FADDDrr %0, %1, implicit $fpcr
447 %3:fpr128 = MOVIv2d_ns 0
448 %4:fpr64 = COPY %3.dsub
449 %6:fpr128 = IMPLICIT_DEF
450 %5:fpr128 = INSERT_SUBREG %6, killed %4, %subreg.dsub
451 %8:fpr128 = IMPLICIT_DEF
452 %7:fpr128 = INSERT_SUBREG %8, killed %2, %subreg.dsub
453 %9:fpr128 = INSvi64lane %7, 1, killed %5, 0
455 RET_ReallyLR implicit $q0
460 tracksRegLiveness: true
462 - { id: 0, class: gpr64common, preferred-register: '' }
463 - { id: 1, class: fpr64, preferred-register: '' }
464 - { id: 2, class: gpr64all, preferred-register: '' }
465 - { id: 3, class: gpr64sp, preferred-register: '' }
466 - { id: 4, class: fpr128, preferred-register: '' }
467 - { id: 5, class: fpr64, preferred-register: '' }
468 - { id: 6, class: fpr128, preferred-register: '' }
469 - { id: 7, class: fpr128, preferred-register: '' }
470 - { id: 8, class: fpr128, preferred-register: '' }
471 - { id: 9, class: fpr128, preferred-register: '' }
472 - { id: 10, class: fpr128, preferred-register: '' }
473 - { id: 11, class: fpr64, preferred-register: '' }
474 - { id: 12, class: fpr64, preferred-register: '' }
475 - { id: 13, class: fpr128, preferred-register: '' }
476 - { id: 14, class: fpr128, preferred-register: '' }
477 - { id: 15, class: gpr32all, preferred-register: '' }
478 - { id: 16, class: fpr32, preferred-register: '' }
480 - { reg: '$x0', virtual-reg: '%0' }
485 ; CHECK-LABEL: name: asm
486 ; CHECK: liveins: $x0
488 ; CHECK-NEXT: [[COPY:%[0-9]+]]:gpr64common = COPY $x0
489 ; CHECK-NEXT: [[DEF:%[0-9]+]]:gpr64all = IMPLICIT_DEF
490 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:gpr64sp = COPY [[DEF]]
491 ; CHECK-NEXT: INLINEASM &"ldr ${0:s}, $1", 8 /* mayload attdialect */, 2359306 /* regdef:FPR64 */, def %1, 262158 /* mem:m */, killed [[COPY1]]
492 ; CHECK-NEXT: [[MOVIv2d_ns:%[0-9]+]]:fpr128 = MOVIv2d_ns 0
493 ; CHECK-NEXT: [[COPY2:%[0-9]+]]:fpr64 = COPY [[MOVIv2d_ns]].dsub
494 ; CHECK-NEXT: [[DEF1:%[0-9]+]]:fpr128 = IMPLICIT_DEF
495 ; CHECK-NEXT: [[INSERT_SUBREG:%[0-9]+]]:fpr128 = INSERT_SUBREG [[DEF1]], killed [[COPY2]], %subreg.dsub
496 ; CHECK-NEXT: [[DEF2:%[0-9]+]]:fpr128 = IMPLICIT_DEF
497 ; CHECK-NEXT: [[INSERT_SUBREG1:%[0-9]+]]:fpr128 = INSERT_SUBREG [[DEF2]], %1, %subreg.dsub
498 ; CHECK-NEXT: [[INSvi64lane:%[0-9]+]]:fpr128 = INSvi64lane [[INSERT_SUBREG1]], 1, killed [[INSERT_SUBREG]], 0
499 ; CHECK-NEXT: [[DEF3:%[0-9]+]]:fpr64 = IMPLICIT_DEF
500 ; CHECK-NEXT: [[TBLv8i8One:%[0-9]+]]:fpr64 = TBLv8i8One killed [[INSvi64lane]], killed [[DEF3]]
501 ; CHECK-NEXT: [[DEF4:%[0-9]+]]:fpr128 = IMPLICIT_DEF
502 ; CHECK-NEXT: [[INSERT_SUBREG2:%[0-9]+]]:fpr128 = INSERT_SUBREG [[DEF4]], killed [[TBLv8i8One]], %subreg.dsub
503 ; CHECK-NEXT: [[COPY3:%[0-9]+]]:fpr32 = COPY [[INSERT_SUBREG2]].ssub
504 ; CHECK-NEXT: STRSui killed [[COPY3]], [[COPY]], 0 :: (store (s32) into %ir.hist)
505 ; CHECK-NEXT: RET_ReallyLR
506 %0:gpr64common = COPY $x0
507 %2:gpr64all = IMPLICIT_DEF
509 INLINEASM &"ldr ${0:s}, $1", 8 /* mayload attdialect */, 2359306 /* regdef:FPR64 */, def %1, 262158 /* mem:m */, killed %3
510 %4:fpr128 = MOVIv2d_ns 0
511 %5:fpr64 = COPY %4.dsub
512 %7:fpr128 = IMPLICIT_DEF
513 %6:fpr128 = INSERT_SUBREG %7, killed %5, %subreg.dsub
514 %9:fpr128 = IMPLICIT_DEF
515 %8:fpr128 = INSERT_SUBREG %9, %1, %subreg.dsub
516 %10:fpr128 = INSvi64lane %8, 1, killed %6, 0
517 %12:fpr64 = IMPLICIT_DEF
518 %11:fpr64 = TBLv8i8One killed %10, killed %12
519 %14:fpr128 = IMPLICIT_DEF
520 %13:fpr128 = INSERT_SUBREG %14, killed %11, %subreg.dsub
521 %16:fpr32 = COPY %13.ssub
522 STRSui killed %16, %0, 0 :: (store (s32) into %ir.hist)