1 # NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py
2 # RUN: llc -O0 -march=aarch64 -run-pass=legalizer -global-isel-abort=1 %s -o - | FileCheck %s
9 ; CHECK-LABEL: name: test_load
10 ; CHECK: [[COPY:%[0-9]+]]:_(p0) = COPY $x0
11 ; CHECK: [[LOAD:%[0-9]+]]:_(s8) = G_LOAD [[COPY]](p0) :: (load (s8))
12 ; CHECK: [[ASSERT_ZEXT:%[0-9]+]]:_(s8) = G_ASSERT_ZEXT [[LOAD]], 1
13 ; CHECK: [[ANYEXT:%[0-9]+]]:_(s32) = G_ANYEXT [[ASSERT_ZEXT]](s8)
14 ; CHECK: $w0 = COPY [[ANYEXT]](s32)
15 ; CHECK: [[LOAD1:%[0-9]+]]:_(s8) = G_LOAD [[COPY]](p0) :: (load (s8))
16 ; CHECK: [[ANYEXT1:%[0-9]+]]:_(s32) = G_ANYEXT [[LOAD1]](s8)
17 ; CHECK: $w0 = COPY [[ANYEXT1]](s32)
18 ; CHECK: [[LOAD2:%[0-9]+]]:_(s16) = G_LOAD [[COPY]](p0) :: (load (s16))
19 ; CHECK: [[ANYEXT2:%[0-9]+]]:_(s32) = G_ANYEXT [[LOAD2]](s16)
20 ; CHECK: $w0 = COPY [[ANYEXT2]](s32)
21 ; CHECK: $w0 = COPY [[ANYEXT1]](s32)
22 ; CHECK: [[LOAD3:%[0-9]+]]:_(s64) = G_LOAD [[COPY]](p0) :: (load (s64))
23 ; CHECK: $x0 = COPY [[LOAD3]](s64)
24 ; CHECK: [[LOAD4:%[0-9]+]]:_(p0) = G_LOAD [[COPY]](p0) :: (load (p0))
25 ; CHECK: [[PTRTOINT:%[0-9]+]]:_(s64) = G_PTRTOINT [[LOAD4]](p0)
26 ; CHECK: $x0 = COPY [[PTRTOINT]](s64)
27 ; CHECK: [[LOAD5:%[0-9]+]]:_(<2 x s32>) = G_LOAD [[COPY]](p0) :: (load (<2 x s32>))
28 ; CHECK: [[BITCAST:%[0-9]+]]:_(s64) = G_BITCAST [[LOAD5]](<2 x s32>)
29 ; CHECK: $x0 = COPY [[BITCAST]](s64)
30 ; CHECK: [[LOAD6:%[0-9]+]]:_(s128) = G_LOAD [[COPY]](p0) :: (load (s128))
31 ; CHECK: [[TRUNC:%[0-9]+]]:_(s64) = G_TRUNC [[LOAD6]](s128)
32 ; CHECK: $x0 = COPY [[TRUNC]](s64)
34 %1:_(s1) = G_LOAD %0(p0) :: (load (s1))
35 %2:_(s32) = G_ANYEXT %1(s1)
37 %3:_(s8) = G_LOAD %0(p0) :: (load (s8))
38 %4:_(s32) = G_ANYEXT %3(s8)
40 %5:_(s16) = G_LOAD %0(p0) :: (load (s16))
41 %6:_(s32) = G_ANYEXT %5(s16)
43 %7:_(s32) = G_LOAD %0(p0) :: (load (s32))
45 %8:_(s64) = G_LOAD %0(p0) :: (load (s64))
47 %9:_(p0) = G_LOAD %0(p0) :: (load (p0))
48 %10:_(s64) = G_PTRTOINT %9(p0)
50 %11:_(<2 x s32>) = G_LOAD %0(p0) :: (load (<2 x s32>))
51 %12:_(s64) = G_BITCAST %11(<2 x s32>)
53 %13:_(s128) = G_LOAD %0(p0) :: (load (s128))
54 %14:_(s64) = G_TRUNC %13(s128)
64 ; CHECK-LABEL: name: test_store
65 ; CHECK: [[COPY:%[0-9]+]]:_(p0) = COPY $x0
66 ; CHECK: [[COPY1:%[0-9]+]]:_(s32) = COPY $w1
67 ; CHECK: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 1
68 ; CHECK: [[COPY2:%[0-9]+]]:_(s32) = COPY [[COPY1]](s32)
69 ; CHECK: [[AND:%[0-9]+]]:_(s32) = G_AND [[COPY2]], [[C]]
70 ; CHECK: [[AND1:%[0-9]+]]:_(s32) = G_AND [[AND]], [[C]]
71 ; CHECK: [[TRUNC:%[0-9]+]]:_(s8) = G_TRUNC [[AND1]](s32)
72 ; CHECK: G_STORE [[TRUNC]](s8), [[COPY]](p0) :: (store (s8))
73 ; CHECK: [[TRUNC1:%[0-9]+]]:_(s8) = G_TRUNC [[COPY1]](s32)
74 ; CHECK: G_STORE [[TRUNC1]](s8), [[COPY]](p0) :: (store (s8))
75 ; CHECK: [[TRUNC2:%[0-9]+]]:_(s16) = G_TRUNC [[COPY1]](s32)
76 ; CHECK: G_STORE [[TRUNC2]](s16), [[COPY]](p0) :: (store (s16))
77 ; CHECK: G_STORE [[COPY1]](s32), [[COPY]](p0) :: (store (s32))
78 ; CHECK: [[PTRTOINT:%[0-9]+]]:_(s64) = G_PTRTOINT [[COPY]](p0)
79 ; CHECK: G_STORE [[PTRTOINT]](s64), [[COPY]](p0) :: (store (s64))
80 ; CHECK: G_STORE [[COPY]](p0), [[COPY]](p0) :: (store (p0))
81 ; CHECK: [[PTRTOINT1:%[0-9]+]]:_(s64) = G_PTRTOINT [[COPY]](p0)
82 ; CHECK: [[MV:%[0-9]+]]:_(s128) = G_MERGE_VALUES [[PTRTOINT1]](s64), [[PTRTOINT1]](s64)
83 ; CHECK: G_STORE [[MV]](s128), [[COPY]](p0) :: (store (s128))
86 %2:_(s1) = G_TRUNC %1(s32)
87 G_STORE %2(s1), %0(p0) :: (store (s1))
88 %3:_(s8) = G_TRUNC %1(s32)
89 G_STORE %3(s8), %0(p0) :: (store (s8))
90 %4:_(s16) = G_TRUNC %1(s32)
91 G_STORE %4(s16), %0(p0) :: (store (s16))
92 G_STORE %1(s32), %0(p0) :: (store (s32))
93 %5:_(s64) = G_PTRTOINT %0(p0)
94 G_STORE %5(s64), %0(p0) :: (store (s64))
95 G_STORE %0(p0), %0(p0) :: (store (p0))
96 %6:_(s64) = G_PTRTOINT %0(p0)
97 %7:_(s128) = G_MERGE_VALUES %6(s64), %6
98 G_STORE %7(s128), %0(p0) :: (store (s128))
103 tracksRegLiveness: true
104 machineFunctionInfo: {}
109 ; CHECK-LABEL: name: store_4xi16
110 ; CHECK: liveins: $d0, $x0
111 ; CHECK: [[COPY:%[0-9]+]]:_(<4 x s16>) = COPY $d0
112 ; CHECK: [[COPY1:%[0-9]+]]:_(p0) = COPY $x0
113 ; CHECK: G_STORE [[COPY]](<4 x s16>), [[COPY1]](p0) :: (store (<4 x s16>))
114 ; CHECK: RET_ReallyLR
115 %0:_(<4 x s16>) = COPY $d0
117 G_STORE %0(<4 x s16>), %1(p0) :: (store (<4 x s16>))
124 tracksRegLiveness: true
125 machineFunctionInfo: {}
130 ; CHECK-LABEL: name: store_4xi32
131 ; CHECK: liveins: $q0, $x0
132 ; CHECK: [[COPY:%[0-9]+]]:_(<4 x s32>) = COPY $q0
133 ; CHECK: [[COPY1:%[0-9]+]]:_(p0) = COPY $x0
134 ; CHECK: G_STORE [[COPY]](<4 x s32>), [[COPY1]](p0) :: (store (<4 x s32>))
135 ; CHECK: RET_ReallyLR
136 %0:_(<4 x s32>) = COPY $q0
138 G_STORE %0(<4 x s32>), %1(p0) :: (store (<4 x s32>))
145 tracksRegLiveness: true
146 machineFunctionInfo: {}
151 ; CHECK-LABEL: name: store_8xi16
152 ; CHECK: liveins: $q0, $x0
153 ; CHECK: [[COPY:%[0-9]+]]:_(<8 x s16>) = COPY $q0
154 ; CHECK: [[COPY1:%[0-9]+]]:_(p0) = COPY $x0
155 ; CHECK: G_STORE [[COPY]](<8 x s16>), [[COPY1]](p0) :: (store (<8 x s16>))
156 ; CHECK: RET_ReallyLR
157 %0:_(<8 x s16>) = COPY $q0
159 G_STORE %0(<8 x s16>), %1(p0) :: (store (<8 x s16>))
166 tracksRegLiveness: true
167 machineFunctionInfo: {}
172 ; CHECK-LABEL: name: store_16xi8
173 ; CHECK: liveins: $q0, $x0
174 ; CHECK: [[COPY:%[0-9]+]]:_(<16 x s8>) = COPY $q0
175 ; CHECK: [[COPY1:%[0-9]+]]:_(p0) = COPY $x0
176 ; CHECK: G_STORE [[COPY]](<16 x s8>), [[COPY1]](p0) :: (store (<16 x s8>))
177 ; CHECK: RET_ReallyLR
178 %0:_(<16 x s8>) = COPY $q0
180 G_STORE %0(<16 x s8>), %1(p0) :: (store (<16 x s8>))
187 tracksRegLiveness: true
188 machineFunctionInfo: {}
193 ; CHECK-LABEL: name: load_4xi16
194 ; CHECK: liveins: $x0
195 ; CHECK: [[COPY:%[0-9]+]]:_(p0) = COPY $x0
196 ; CHECK: [[LOAD:%[0-9]+]]:_(<4 x s16>) = G_LOAD [[COPY]](p0) :: (load (<4 x s16>))
197 ; CHECK: $d0 = COPY [[LOAD]](<4 x s16>)
198 ; CHECK: RET_ReallyLR implicit $d0
200 %1:_(<4 x s16>) = G_LOAD %0(p0) :: (load (<4 x s16>))
201 $d0 = COPY %1(<4 x s16>)
202 RET_ReallyLR implicit $d0
208 tracksRegLiveness: true
209 machineFunctionInfo: {}
214 ; CHECK-LABEL: name: load_4xi32
215 ; CHECK: liveins: $x0
216 ; CHECK: [[COPY:%[0-9]+]]:_(p0) = COPY $x0
217 ; CHECK: [[LOAD:%[0-9]+]]:_(<4 x s32>) = G_LOAD [[COPY]](p0) :: (load (<4 x s32>))
218 ; CHECK: $q0 = COPY [[LOAD]](<4 x s32>)
219 ; CHECK: RET_ReallyLR implicit $q0
221 %1:_(<4 x s32>) = G_LOAD %0(p0) :: (load (<4 x s32>))
222 $q0 = COPY %1(<4 x s32>)
223 RET_ReallyLR implicit $q0
229 tracksRegLiveness: true
230 machineFunctionInfo: {}
235 ; CHECK-LABEL: name: load_8xi16
236 ; CHECK: liveins: $x0
237 ; CHECK: [[COPY:%[0-9]+]]:_(p0) = COPY $x0
238 ; CHECK: [[LOAD:%[0-9]+]]:_(<8 x s16>) = G_LOAD [[COPY]](p0) :: (load (<8 x s16>))
239 ; CHECK: $q0 = COPY [[LOAD]](<8 x s16>)
240 ; CHECK: RET_ReallyLR implicit $q0
242 %1:_(<8 x s16>) = G_LOAD %0(p0) :: (load (<8 x s16>))
243 $q0 = COPY %1(<8 x s16>)
244 RET_ReallyLR implicit $q0
250 tracksRegLiveness: true
251 machineFunctionInfo: {}
256 ; CHECK-LABEL: name: load_16xi8
257 ; CHECK: liveins: $x0
258 ; CHECK: [[COPY:%[0-9]+]]:_(p0) = COPY $x0
259 ; CHECK: [[LOAD:%[0-9]+]]:_(<16 x s8>) = G_LOAD [[COPY]](p0) :: (load (<16 x s8>))
260 ; CHECK: $q0 = COPY [[LOAD]](<16 x s8>)
261 ; CHECK: RET_ReallyLR implicit $q0
263 %1:_(<16 x s8>) = G_LOAD %0(p0) :: (load (<16 x s8>))
264 $q0 = COPY %1(<16 x s8>)
265 RET_ReallyLR implicit $q0
271 tracksRegLiveness: true
272 machineFunctionInfo: {}
276 ; CHECK-LABEL: name: load_8xi8
277 ; CHECK: liveins: $x0
278 ; CHECK: [[COPY:%[0-9]+]]:_(p0) = COPY $x0
279 ; CHECK: [[LOAD:%[0-9]+]]:_(<8 x s8>) = G_LOAD [[COPY]](p0) :: (load (<8 x s8>))
280 ; CHECK: $d0 = COPY [[LOAD]](<8 x s8>)
281 ; CHECK: RET_ReallyLR implicit $d0
283 %1:_(<8 x s8>) = G_LOAD %0(p0) :: (load (<8 x s8>))
284 $d0 = COPY %1(<8 x s8>)
285 RET_ReallyLR implicit $d0
291 tracksRegLiveness: true
292 machineFunctionInfo: {}
296 ; CHECK-LABEL: name: store_8xi8
297 ; CHECK: liveins: $x0, $d0
298 ; CHECK: [[COPY:%[0-9]+]]:_(p0) = COPY $x0
299 ; CHECK: [[COPY1:%[0-9]+]]:_(<8 x s8>) = COPY $d0
300 ; CHECK: G_STORE [[COPY1]](<8 x s8>), [[COPY]](p0) :: (store (<8 x s8>))
301 ; CHECK: RET_ReallyLR
303 %1:_(<8 x s8>) = COPY $d0
304 G_STORE %1(<8 x s8>), %0(p0) :: (store (<8 x s8>))
310 tracksRegLiveness: true
311 machineFunctionInfo: {}
315 ; CHECK-LABEL: name: store_32xs8
316 ; CHECK: liveins: $x0
317 ; CHECK: [[DEF:%[0-9]+]]:_(s8) = G_IMPLICIT_DEF
318 ; CHECK: %ptr:_(p0) = COPY $x0
319 ; CHECK: [[BUILD_VECTOR:%[0-9]+]]:_(<16 x s8>) = G_BUILD_VECTOR [[DEF]](s8), [[DEF]](s8), [[DEF]](s8), [[DEF]](s8), [[DEF]](s8), [[DEF]](s8), [[DEF]](s8), [[DEF]](s8), [[DEF]](s8), [[DEF]](s8), [[DEF]](s8), [[DEF]](s8), [[DEF]](s8), [[DEF]](s8), [[DEF]](s8), [[DEF]](s8)
320 ; CHECK: [[BUILD_VECTOR1:%[0-9]+]]:_(<16 x s8>) = G_BUILD_VECTOR [[DEF]](s8), [[DEF]](s8), [[DEF]](s8), [[DEF]](s8), [[DEF]](s8), [[DEF]](s8), [[DEF]](s8), [[DEF]](s8), [[DEF]](s8), [[DEF]](s8), [[DEF]](s8), [[DEF]](s8), [[DEF]](s8), [[DEF]](s8), [[DEF]](s8), [[DEF]](s8)
321 ; CHECK: G_STORE [[BUILD_VECTOR]](<16 x s8>), %ptr(p0) :: (store (<16 x s8>), align 32)
322 ; CHECK: [[C:%[0-9]+]]:_(s64) = G_CONSTANT i64 16
323 ; CHECK: [[PTR_ADD:%[0-9]+]]:_(p0) = G_PTR_ADD %ptr, [[C]](s64)
324 ; CHECK: G_STORE [[BUILD_VECTOR1]](<16 x s8>), [[PTR_ADD]](p0) :: (store (<16 x s8>) into unknown-address + 16)
325 ; CHECK: RET_ReallyLR
326 %val:_(<32 x s8>) = G_IMPLICIT_DEF
327 %ptr:_(p0) = COPY $x0
328 G_STORE %val(<32 x s8>), %ptr(p0) :: (store (<32 x s8>))
334 tracksRegLiveness: true
335 machineFunctionInfo: {}
339 ; CHECK-LABEL: name: store_16xs16
340 ; CHECK: liveins: $x0
341 ; CHECK: [[DEF:%[0-9]+]]:_(s16) = G_IMPLICIT_DEF
342 ; CHECK: %ptr:_(p0) = COPY $x0
343 ; CHECK: [[BUILD_VECTOR:%[0-9]+]]:_(<8 x s16>) = G_BUILD_VECTOR [[DEF]](s16), [[DEF]](s16), [[DEF]](s16), [[DEF]](s16), [[DEF]](s16), [[DEF]](s16), [[DEF]](s16), [[DEF]](s16)
344 ; CHECK: [[BUILD_VECTOR1:%[0-9]+]]:_(<8 x s16>) = G_BUILD_VECTOR [[DEF]](s16), [[DEF]](s16), [[DEF]](s16), [[DEF]](s16), [[DEF]](s16), [[DEF]](s16), [[DEF]](s16), [[DEF]](s16)
345 ; CHECK: G_STORE [[BUILD_VECTOR]](<8 x s16>), %ptr(p0) :: (store (<8 x s16>), align 32)
346 ; CHECK: [[C:%[0-9]+]]:_(s64) = G_CONSTANT i64 16
347 ; CHECK: [[PTR_ADD:%[0-9]+]]:_(p0) = G_PTR_ADD %ptr, [[C]](s64)
348 ; CHECK: G_STORE [[BUILD_VECTOR1]](<8 x s16>), [[PTR_ADD]](p0) :: (store (<8 x s16>) into unknown-address + 16)
349 ; CHECK: RET_ReallyLR
350 %val:_(<16 x s16>) = G_IMPLICIT_DEF
351 %ptr:_(p0) = COPY $x0
352 G_STORE %val(<16 x s16>), %ptr(p0) :: (store (<16 x s16>))
358 tracksRegLiveness: true
359 machineFunctionInfo: {}
363 ; CHECK-LABEL: name: store_8xs32
364 ; CHECK: liveins: $x0
365 ; CHECK: [[DEF:%[0-9]+]]:_(s32) = G_IMPLICIT_DEF
366 ; CHECK: %ptr:_(p0) = COPY $x0
367 ; CHECK: [[BUILD_VECTOR:%[0-9]+]]:_(<4 x s32>) = G_BUILD_VECTOR [[DEF]](s32), [[DEF]](s32), [[DEF]](s32), [[DEF]](s32)
368 ; CHECK: [[BUILD_VECTOR1:%[0-9]+]]:_(<4 x s32>) = G_BUILD_VECTOR [[DEF]](s32), [[DEF]](s32), [[DEF]](s32), [[DEF]](s32)
369 ; CHECK: G_STORE [[BUILD_VECTOR]](<4 x s32>), %ptr(p0) :: (store (<4 x s32>), align 32)
370 ; CHECK: [[C:%[0-9]+]]:_(s64) = G_CONSTANT i64 16
371 ; CHECK: [[PTR_ADD:%[0-9]+]]:_(p0) = G_PTR_ADD %ptr, [[C]](s64)
372 ; CHECK: G_STORE [[BUILD_VECTOR1]](<4 x s32>), [[PTR_ADD]](p0) :: (store (<4 x s32>) into unknown-address + 16)
373 ; CHECK: RET_ReallyLR
374 %val:_(<8 x s32>) = G_IMPLICIT_DEF
375 %ptr:_(p0) = COPY $x0
376 G_STORE %val(<8 x s32>), %ptr(p0) :: (store (<8 x s32>))
382 tracksRegLiveness: true
383 machineFunctionInfo: {}
387 ; CHECK-LABEL: name: store_4xs64
388 ; CHECK: liveins: $x0
389 ; CHECK: [[DEF:%[0-9]+]]:_(<2 x s64>) = G_IMPLICIT_DEF
390 ; CHECK: %ptr:_(p0) = COPY $x0
391 ; CHECK: G_STORE [[DEF]](<2 x s64>), %ptr(p0) :: (store (<2 x s64>), align 32)
392 ; CHECK: [[C:%[0-9]+]]:_(s64) = G_CONSTANT i64 16
393 ; CHECK: [[PTR_ADD:%[0-9]+]]:_(p0) = G_PTR_ADD %ptr, [[C]](s64)
394 ; CHECK: G_STORE [[DEF]](<2 x s64>), [[PTR_ADD]](p0) :: (store (<2 x s64>) into unknown-address + 16)
395 ; CHECK: RET_ReallyLR
396 %val:_(<4 x s64>) = G_IMPLICIT_DEF
397 %ptr:_(p0) = COPY $x0
398 G_STORE %val(<4 x s64>), %ptr(p0) :: (store (<4 x s64>))
404 tracksRegLiveness: true
405 machineFunctionInfo: {}
409 ; CHECK-LABEL: name: load_32xs8
410 ; CHECK: liveins: $x0
411 ; CHECK: %ptr:_(p0) = COPY $x0
412 ; CHECK: [[LOAD:%[0-9]+]]:_(<16 x s8>) = G_LOAD %ptr(p0) :: (load (<16 x s8>), align 32)
413 ; CHECK: [[C:%[0-9]+]]:_(s64) = G_CONSTANT i64 16
414 ; CHECK: [[PTR_ADD:%[0-9]+]]:_(p0) = G_PTR_ADD %ptr, [[C]](s64)
415 ; CHECK: [[LOAD1:%[0-9]+]]:_(<16 x s8>) = G_LOAD [[PTR_ADD]](p0) :: (load (<16 x s8>) from unknown-address + 16)
416 ; CHECK: G_STORE [[LOAD]](<16 x s8>), %ptr(p0) :: (store (<16 x s8>), align 32)
417 ; CHECK: [[PTR_ADD1:%[0-9]+]]:_(p0) = G_PTR_ADD %ptr, [[C]](s64)
418 ; CHECK: G_STORE [[LOAD1]](<16 x s8>), [[PTR_ADD1]](p0) :: (store (<16 x s8>) into unknown-address + 16)
419 ; CHECK: RET_ReallyLR
420 %ptr:_(p0) = COPY $x0
421 %val:_(<32 x s8>) = G_LOAD %ptr(p0) :: (load (<32 x s8>))
422 G_STORE %val(<32 x s8>), %ptr(p0) :: (store (<32 x s8>))
428 tracksRegLiveness: true
429 machineFunctionInfo: {}
433 ; CHECK-LABEL: name: load_16xs16
434 ; CHECK: liveins: $x0
435 ; CHECK: %ptr:_(p0) = COPY $x0
436 ; CHECK: [[LOAD:%[0-9]+]]:_(<8 x s16>) = G_LOAD %ptr(p0) :: (load (<8 x s16>), align 32)
437 ; CHECK: [[C:%[0-9]+]]:_(s64) = G_CONSTANT i64 16
438 ; CHECK: [[PTR_ADD:%[0-9]+]]:_(p0) = G_PTR_ADD %ptr, [[C]](s64)
439 ; CHECK: [[LOAD1:%[0-9]+]]:_(<8 x s16>) = G_LOAD [[PTR_ADD]](p0) :: (load (<8 x s16>) from unknown-address + 16)
440 ; CHECK: G_STORE [[LOAD]](<8 x s16>), %ptr(p0) :: (store (<8 x s16>), align 32)
441 ; CHECK: [[PTR_ADD1:%[0-9]+]]:_(p0) = G_PTR_ADD %ptr, [[C]](s64)
442 ; CHECK: G_STORE [[LOAD1]](<8 x s16>), [[PTR_ADD1]](p0) :: (store (<8 x s16>) into unknown-address + 16)
443 ; CHECK: RET_ReallyLR
444 %ptr:_(p0) = COPY $x0
445 %val:_(<16 x s16>) = G_LOAD %ptr(p0) :: (load (<16 x s16>))
446 G_STORE %val(<16 x s16>), %ptr(p0) :: (store (<16 x s16>))
452 tracksRegLiveness: true
453 machineFunctionInfo: {}
457 ; CHECK-LABEL: name: load_8xs32
458 ; CHECK: liveins: $x0
459 ; CHECK: %ptr:_(p0) = COPY $x0
460 ; CHECK: [[LOAD:%[0-9]+]]:_(<4 x s32>) = G_LOAD %ptr(p0) :: (load (<4 x s32>), align 32)
461 ; CHECK: [[C:%[0-9]+]]:_(s64) = G_CONSTANT i64 16
462 ; CHECK: [[PTR_ADD:%[0-9]+]]:_(p0) = G_PTR_ADD %ptr, [[C]](s64)
463 ; CHECK: [[LOAD1:%[0-9]+]]:_(<4 x s32>) = G_LOAD [[PTR_ADD]](p0) :: (load (<4 x s32>) from unknown-address + 16)
464 ; CHECK: G_STORE [[LOAD]](<4 x s32>), %ptr(p0) :: (store (<4 x s32>), align 32)
465 ; CHECK: [[PTR_ADD1:%[0-9]+]]:_(p0) = G_PTR_ADD %ptr, [[C]](s64)
466 ; CHECK: G_STORE [[LOAD1]](<4 x s32>), [[PTR_ADD1]](p0) :: (store (<4 x s32>) into unknown-address + 16)
467 ; CHECK: RET_ReallyLR
468 %ptr:_(p0) = COPY $x0
469 %val:_(<8 x s32>) = G_LOAD %ptr(p0) :: (load (<8 x s32>))
470 G_STORE %val(<8 x s32>), %ptr(p0) :: (store (<8 x s32>))
476 tracksRegLiveness: true
477 machineFunctionInfo: {}
481 ; CHECK-LABEL: name: load_4xs64
482 ; CHECK: liveins: $x0
483 ; CHECK: %ptr:_(p0) = COPY $x0
484 ; CHECK: [[LOAD:%[0-9]+]]:_(<2 x s64>) = G_LOAD %ptr(p0) :: (load (<2 x s64>), align 32)
485 ; CHECK: [[C:%[0-9]+]]:_(s64) = G_CONSTANT i64 16
486 ; CHECK: [[PTR_ADD:%[0-9]+]]:_(p0) = G_PTR_ADD %ptr, [[C]](s64)
487 ; CHECK: [[LOAD1:%[0-9]+]]:_(<2 x s64>) = G_LOAD [[PTR_ADD]](p0) :: (load (<2 x s64>) from unknown-address + 16)
488 ; CHECK: G_STORE [[LOAD]](<2 x s64>), %ptr(p0) :: (store (<2 x s64>), align 32)
489 ; CHECK: [[PTR_ADD1:%[0-9]+]]:_(p0) = G_PTR_ADD %ptr, [[C]](s64)
490 ; CHECK: G_STORE [[LOAD1]](<2 x s64>), [[PTR_ADD1]](p0) :: (store (<2 x s64>) into unknown-address + 16)
491 ; CHECK: RET_ReallyLR
492 %ptr:_(p0) = COPY $x0
493 %val:_(<4 x s64>) = G_LOAD %ptr(p0) :: (load (<4 x s64>))
494 G_STORE %val(<4 x s64>), %ptr(p0) :: (store (<4 x s64>))
498 name: test_trunc_store
503 ; CHECK-LABEL: name: test_trunc_store
504 ; CHECK: [[COPY:%[0-9]+]]:_(p0) = COPY $x0
505 ; CHECK: [[COPY1:%[0-9]+]]:_(s32) = COPY $w1
506 ; CHECK: %val64:_(s64) = COPY $x2
507 ; CHECK: G_STORE [[COPY1]](s32), [[COPY]](p0) :: (store (s8))
508 ; CHECK: G_STORE [[COPY1]](s32), [[COPY]](p0) :: (store (s16))
509 ; CHECK: G_STORE %val64(s64), [[COPY]](p0) :: (store (s8))
510 ; CHECK: G_STORE %val64(s64), [[COPY]](p0) :: (store (s16))
511 ; CHECK: G_STORE %val64(s64), [[COPY]](p0) :: (store (s32))
514 %2:_(s8) = G_TRUNC %1(s32)
515 %val64:_(s64) = COPY $x2
516 G_STORE %1(s32), %0(p0) :: (store (s8))
517 G_STORE %1(s32), %0(p0) :: (store (s16))
518 G_STORE %val64(s64), %0(p0) :: (store (s8))
519 G_STORE %val64(s64), %0(p0) :: (store (s16))
520 G_STORE %val64(s64), %0(p0) :: (store (s32))
524 tracksRegLiveness: true
528 ; CHECK-LABEL: name: store_6xs64
529 ; CHECK: liveins: $x0
530 ; CHECK: [[DEF:%[0-9]+]]:_(<2 x s64>) = G_IMPLICIT_DEF
531 ; CHECK: %ptr:_(p0) = COPY $x0
532 ; CHECK: G_STORE [[DEF]](<2 x s64>), %ptr(p0) :: (store (<2 x s64>))
533 ; CHECK: [[C:%[0-9]+]]:_(s64) = G_CONSTANT i64 16
534 ; CHECK: [[PTR_ADD:%[0-9]+]]:_(p0) = G_PTR_ADD %ptr, [[C]](s64)
535 ; CHECK: G_STORE [[DEF]](<2 x s64>), [[PTR_ADD]](p0) :: (store (<2 x s64>) into unknown-address + 16)
536 ; CHECK: [[C1:%[0-9]+]]:_(s64) = G_CONSTANT i64 32
537 ; CHECK: [[PTR_ADD1:%[0-9]+]]:_(p0) = G_PTR_ADD %ptr, [[C1]](s64)
538 ; CHECK: G_STORE [[DEF]](<2 x s64>), [[PTR_ADD1]](p0) :: (store (<2 x s64>) into unknown-address + 32)
539 ; CHECK: RET_ReallyLR
540 %val:_(<6 x s64>) = G_IMPLICIT_DEF
541 %ptr:_(p0) = COPY $x0
542 G_STORE %val(<6 x s64>), %ptr(p0) :: (store (<6 x s64>), align 16)
547 tracksRegLiveness: true
552 ; CHECK-LABEL: name: store_2xi16
553 ; CHECK: liveins: $s0, $x0
554 ; CHECK: [[COPY:%[0-9]+]]:_(p0) = COPY $x0
555 ; CHECK: [[COPY1:%[0-9]+]]:_(<2 x s16>) = COPY $s0
556 ; CHECK: [[UV:%[0-9]+]]:_(s16), [[UV1:%[0-9]+]]:_(s16) = G_UNMERGE_VALUES [[COPY1]](<2 x s16>)
557 ; CHECK: G_STORE [[UV]](s16), [[COPY]](p0) :: (store (s16), align 4)
558 ; CHECK: [[C:%[0-9]+]]:_(s64) = G_CONSTANT i64 2
559 ; CHECK: [[PTR_ADD:%[0-9]+]]:_(p0) = G_PTR_ADD [[COPY]], [[C]](s64)
560 ; CHECK: G_STORE [[UV1]](s16), [[PTR_ADD]](p0) :: (store (s16) into unknown-address + 2)
561 ; CHECK: RET_ReallyLR
563 %1:_(<2 x s16>) = COPY $s0
564 G_STORE %1(<2 x s16>), %0(p0) :: (store (<2 x s16>))
570 tracksRegLiveness: true
575 ; CHECK-LABEL: name: load_2xi16
576 ; CHECK: liveins: $s0, $x0
577 ; CHECK: [[COPY:%[0-9]+]]:_(p0) = COPY $x0
578 ; CHECK: [[LOAD:%[0-9]+]]:_(s16) = G_LOAD [[COPY]](p0) :: (load (s16), align 4)
579 ; CHECK: [[C:%[0-9]+]]:_(s64) = G_CONSTANT i64 2
580 ; CHECK: [[PTR_ADD:%[0-9]+]]:_(p0) = G_PTR_ADD [[COPY]], [[C]](s64)
581 ; CHECK: [[LOAD1:%[0-9]+]]:_(s16) = G_LOAD [[PTR_ADD]](p0) :: (load (s16) from unknown-address + 2)
582 ; CHECK: [[BUILD_VECTOR:%[0-9]+]]:_(<2 x s16>) = G_BUILD_VECTOR [[LOAD]](s16), [[LOAD1]](s16)
583 ; CHECK: $s0 = COPY [[BUILD_VECTOR]](<2 x s16>)
584 ; CHECK: RET_ReallyLR
586 %1(<2 x s16>) = G_LOAD %0(p0) :: (load (<2 x s16>))
587 $s0 = COPY %1:_(<2 x s16>)
592 name: load_store_s88_s88_mem_size
593 tracksRegLiveness: true
597 ; CHECK-LABEL: name: load_store_s88_s88_mem_size
598 ; CHECK: liveins: $x0
599 ; CHECK: %ptr:_(p0) = COPY $x0
600 ; CHECK: [[LOAD:%[0-9]+]]:_(s64) = G_LOAD %ptr(p0) :: (load (s64), align 16)
601 ; CHECK: [[C:%[0-9]+]]:_(s64) = G_CONSTANT i64 0
602 ; CHECK: [[C1:%[0-9]+]]:_(s64) = G_CONSTANT i64 8
603 ; CHECK: [[PTR_ADD:%[0-9]+]]:_(p0) = G_PTR_ADD %ptr, [[C1]](s64)
604 ; CHECK: [[ZEXTLOAD:%[0-9]+]]:_(s64) = G_ZEXTLOAD [[PTR_ADD]](p0) :: (load (s16) from unknown-address + 8, align 8)
605 ; CHECK: [[C2:%[0-9]+]]:_(s64) = G_CONSTANT i64 2
606 ; CHECK: [[PTR_ADD1:%[0-9]+]]:_(p0) = G_PTR_ADD [[PTR_ADD]], [[C2]](s64)
607 ; CHECK: [[LOAD1:%[0-9]+]]:_(s32) = G_LOAD [[PTR_ADD1]](p0) :: (load (s8) from unknown-address + 10, align 2)
608 ; CHECK: [[DEF:%[0-9]+]]:_(s32) = G_IMPLICIT_DEF
609 ; CHECK: [[MV:%[0-9]+]]:_(s64) = G_MERGE_VALUES [[LOAD1]](s32), [[DEF]](s32)
610 ; CHECK: [[DEF1:%[0-9]+]]:_(s64) = G_IMPLICIT_DEF
611 ; CHECK: [[C3:%[0-9]+]]:_(s64) = G_CONSTANT i64 16
612 ; CHECK: [[SHL:%[0-9]+]]:_(s64) = G_SHL [[MV]], [[C3]](s64)
613 ; CHECK: [[SHL1:%[0-9]+]]:_(s64) = G_SHL [[DEF1]], [[C3]](s64)
614 ; CHECK: [[C4:%[0-9]+]]:_(s64) = G_CONSTANT i64 48
615 ; CHECK: [[LSHR:%[0-9]+]]:_(s64) = G_LSHR [[MV]], [[C4]](s64)
616 ; CHECK: [[OR:%[0-9]+]]:_(s64) = G_OR [[SHL1]], [[LSHR]]
617 ; CHECK: [[OR1:%[0-9]+]]:_(s64) = G_OR [[SHL]], [[ZEXTLOAD]]
618 ; CHECK: [[C5:%[0-9]+]]:_(s64) = G_CONSTANT i64 64
619 ; CHECK: [[OR2:%[0-9]+]]:_(s64) = G_OR [[C]], [[LOAD]]
620 ; CHECK: [[OR3:%[0-9]+]]:_(s64) = G_OR [[OR1]], [[C]]
621 ; CHECK: [[COPY:%[0-9]+]]:_(s64) = COPY [[OR2]](s64)
622 ; CHECK: [[TRUNC:%[0-9]+]]:_(s32) = G_TRUNC [[OR3]](s64)
623 ; CHECK: G_STORE [[COPY]](s64), %ptr(p0) :: (store (s64), align 16)
624 ; CHECK: [[PTR_ADD2:%[0-9]+]]:_(p0) = G_PTR_ADD %ptr, [[C1]](s64)
625 ; CHECK: [[COPY1:%[0-9]+]]:_(s32) = COPY [[TRUNC]](s32)
626 ; CHECK: [[LSHR1:%[0-9]+]]:_(s32) = G_LSHR [[COPY1]], [[C3]](s64)
627 ; CHECK: [[PTR_ADD3:%[0-9]+]]:_(p0) = G_PTR_ADD [[PTR_ADD2]], [[C2]](s64)
628 ; CHECK: G_STORE [[COPY1]](s32), [[PTR_ADD2]](p0) :: (store (s16) into unknown-address + 8, align 8)
629 ; CHECK: G_STORE [[LSHR1]](s32), [[PTR_ADD3]](p0) :: (store (s8) into unknown-address + 10, align 2)
630 ; CHECK: RET_ReallyLR
631 %ptr:_(p0) = COPY $x0
632 %load:_(s88) = G_LOAD %ptr(p0) :: (load (s88))
633 G_STORE %load(s88), %ptr(p0) :: (store (s88))
637 name: load_store_s88_s64_mem_size
638 tracksRegLiveness: true
642 ; CHECK-LABEL: name: load_store_s88_s64_mem_size
643 ; CHECK: liveins: $x0
644 ; CHECK: %ptr:_(p0) = COPY $x0
645 ; CHECK: [[LOAD:%[0-9]+]]:_(s64) = G_LOAD %ptr(p0) :: (load (s64))
646 ; CHECK: [[DEF:%[0-9]+]]:_(s64) = G_IMPLICIT_DEF
647 ; CHECK: G_STORE [[LOAD]](s64), %ptr(p0) :: (store (s64))
648 ; CHECK: RET_ReallyLR
649 %ptr:_(p0) = COPY $x0
650 %load:_(s88) = G_LOAD %ptr(p0) :: (load (s64))
651 G_STORE %load(s88), %ptr(p0) :: (store (s64))
657 tracksRegLiveness: true
658 machineFunctionInfo: {}
662 ; CHECK-LABEL: name: load_s1
663 ; CHECK: liveins: $x0
664 ; CHECK: %ptr:_(p0) = COPY $x0
665 ; CHECK: [[LOAD:%[0-9]+]]:_(s8) = G_LOAD %ptr(p0) :: (load (s8))
666 ; CHECK: [[ASSERT_ZEXT:%[0-9]+]]:_(s8) = G_ASSERT_ZEXT [[LOAD]], 1
667 ; CHECK: [[C:%[0-9]+]]:_(s64) = G_CONSTANT i64 1
668 ; CHECK: [[ANYEXT:%[0-9]+]]:_(s64) = G_ANYEXT [[ASSERT_ZEXT]](s8)
669 ; CHECK: %ext:_(s64) = G_AND [[ANYEXT]], [[C]]
670 ; CHECK: $x0 = COPY %ext(s64)
671 ; CHECK: RET_ReallyLR implicit $x0
672 %ptr:_(p0) = COPY $x0
673 %load:_(s1) = G_LOAD %ptr(p0) :: (load (s1))
674 %ext:_(s64) = G_ZEXT %load
676 RET_ReallyLR implicit $x0
679 name: load_store_6xp0
681 tracksRegLiveness: true
682 machineFunctionInfo: {}
686 ; CHECK-LABEL: name: load_store_6xp0
687 ; CHECK: liveins: $x0
688 ; CHECK: %ptr:_(p0) = COPY $x0
689 ; CHECK: [[LOAD:%[0-9]+]]:_(p0) = G_LOAD %ptr(p0) :: (load (p0), align 64)
690 ; CHECK: [[C:%[0-9]+]]:_(s64) = G_CONSTANT i64 8
691 ; CHECK: [[PTR_ADD:%[0-9]+]]:_(p0) = G_PTR_ADD %ptr, [[C]](s64)
692 ; CHECK: [[LOAD1:%[0-9]+]]:_(p0) = G_LOAD [[PTR_ADD]](p0) :: (load (p0) from unknown-address + 8)
693 ; CHECK: [[C1:%[0-9]+]]:_(s64) = G_CONSTANT i64 16
694 ; CHECK: [[PTR_ADD1:%[0-9]+]]:_(p0) = G_PTR_ADD %ptr, [[C1]](s64)
695 ; CHECK: [[LOAD2:%[0-9]+]]:_(p0) = G_LOAD [[PTR_ADD1]](p0) :: (load (p0) from unknown-address + 16, align 16)
696 ; CHECK: [[C2:%[0-9]+]]:_(s64) = G_CONSTANT i64 24
697 ; CHECK: [[PTR_ADD2:%[0-9]+]]:_(p0) = G_PTR_ADD %ptr, [[C2]](s64)
698 ; CHECK: [[LOAD3:%[0-9]+]]:_(p0) = G_LOAD [[PTR_ADD2]](p0) :: (load (p0) from unknown-address + 24)
699 ; CHECK: [[C3:%[0-9]+]]:_(s64) = G_CONSTANT i64 32
700 ; CHECK: [[PTR_ADD3:%[0-9]+]]:_(p0) = G_PTR_ADD %ptr, [[C3]](s64)
701 ; CHECK: [[LOAD4:%[0-9]+]]:_(p0) = G_LOAD [[PTR_ADD3]](p0) :: (load (p0) from unknown-address + 32, align 32)
702 ; CHECK: [[C4:%[0-9]+]]:_(s64) = G_CONSTANT i64 40
703 ; CHECK: [[PTR_ADD4:%[0-9]+]]:_(p0) = G_PTR_ADD %ptr, [[C4]](s64)
704 ; CHECK: [[LOAD5:%[0-9]+]]:_(p0) = G_LOAD [[PTR_ADD4]](p0) :: (load (p0) from unknown-address + 40)
705 ; CHECK: [[BUILD_VECTOR:%[0-9]+]]:_(<2 x p0>) = G_BUILD_VECTOR [[LOAD]](p0), [[LOAD1]](p0)
706 ; CHECK: [[BUILD_VECTOR1:%[0-9]+]]:_(<2 x p0>) = G_BUILD_VECTOR [[LOAD2]](p0), [[LOAD3]](p0)
707 ; CHECK: [[BUILD_VECTOR2:%[0-9]+]]:_(<2 x p0>) = G_BUILD_VECTOR [[LOAD4]](p0), [[LOAD5]](p0)
708 ; CHECK: [[BITCAST:%[0-9]+]]:_(<2 x s64>) = G_BITCAST [[BUILD_VECTOR]](<2 x p0>)
709 ; CHECK: G_STORE [[BITCAST]](<2 x s64>), %ptr(p0) :: (store (<2 x s64>), align 64)
710 ; CHECK: [[PTR_ADD5:%[0-9]+]]:_(p0) = G_PTR_ADD %ptr, [[C1]](s64)
711 ; CHECK: [[BITCAST1:%[0-9]+]]:_(<2 x s64>) = G_BITCAST [[BUILD_VECTOR1]](<2 x p0>)
712 ; CHECK: G_STORE [[BITCAST1]](<2 x s64>), [[PTR_ADD5]](p0) :: (store (<2 x s64>) into unknown-address + 16)
713 ; CHECK: [[PTR_ADD6:%[0-9]+]]:_(p0) = G_PTR_ADD %ptr, [[C3]](s64)
714 ; CHECK: [[BITCAST2:%[0-9]+]]:_(<2 x s64>) = G_BITCAST [[BUILD_VECTOR2]](<2 x p0>)
715 ; CHECK: G_STORE [[BITCAST2]](<2 x s64>), [[PTR_ADD6]](p0) :: (store (<2 x s64>) into unknown-address + 32, align 32)
716 ; CHECK: RET_ReallyLR
717 %ptr:_(p0) = COPY $x0
718 %val:_(<6 x p0>) = G_LOAD %ptr(p0) :: (load (<6 x p0>))
719 G_STORE %val(<6 x p0>), %ptr(p0) :: (store (<6 x p0>))