1 # NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py
2 # RUN: llc -O0 -mtriple=aarch64 -run-pass=legalizer -global-isel-abort=1 %s -o - | FileCheck %s
9 ; CHECK-LABEL: name: test_load
12 ; CHECK-NEXT: [[COPY:%[0-9]+]]:_(p0) = COPY $x0
13 ; CHECK-NEXT: [[LOAD:%[0-9]+]]:_(s8) = G_LOAD [[COPY]](p0) :: (load (s8))
14 ; CHECK-NEXT: [[ASSERT_ZEXT:%[0-9]+]]:_(s8) = G_ASSERT_ZEXT [[LOAD]], 1
15 ; CHECK-NEXT: [[ANYEXT:%[0-9]+]]:_(s32) = G_ANYEXT [[ASSERT_ZEXT]](s8)
16 ; CHECK-NEXT: $w0 = COPY [[ANYEXT]](s32)
17 ; CHECK-NEXT: [[LOAD1:%[0-9]+]]:_(s8) = G_LOAD [[COPY]](p0) :: (load (s8))
18 ; CHECK-NEXT: [[ANYEXT1:%[0-9]+]]:_(s32) = G_ANYEXT [[LOAD1]](s8)
19 ; CHECK-NEXT: $w0 = COPY [[ANYEXT1]](s32)
20 ; CHECK-NEXT: [[LOAD2:%[0-9]+]]:_(s16) = G_LOAD [[COPY]](p0) :: (load (s16))
21 ; CHECK-NEXT: [[ANYEXT2:%[0-9]+]]:_(s32) = G_ANYEXT [[LOAD2]](s16)
22 ; CHECK-NEXT: $w0 = COPY [[ANYEXT2]](s32)
23 ; CHECK-NEXT: $w0 = COPY [[ANYEXT1]](s32)
24 ; CHECK-NEXT: [[LOAD3:%[0-9]+]]:_(s64) = G_LOAD [[COPY]](p0) :: (load (s64))
25 ; CHECK-NEXT: $x0 = COPY [[LOAD3]](s64)
26 ; CHECK-NEXT: [[LOAD4:%[0-9]+]]:_(p0) = G_LOAD [[COPY]](p0) :: (load (p0))
27 ; CHECK-NEXT: [[PTRTOINT:%[0-9]+]]:_(s64) = G_PTRTOINT [[LOAD4]](p0)
28 ; CHECK-NEXT: $x0 = COPY [[PTRTOINT]](s64)
29 ; CHECK-NEXT: [[LOAD5:%[0-9]+]]:_(<2 x s32>) = G_LOAD [[COPY]](p0) :: (load (<2 x s32>))
30 ; CHECK-NEXT: [[BITCAST:%[0-9]+]]:_(s64) = G_BITCAST [[LOAD5]](<2 x s32>)
31 ; CHECK-NEXT: $x0 = COPY [[BITCAST]](s64)
32 ; CHECK-NEXT: [[LOAD6:%[0-9]+]]:_(s128) = G_LOAD [[COPY]](p0) :: (load (s128))
33 ; CHECK-NEXT: [[TRUNC:%[0-9]+]]:_(s64) = G_TRUNC [[LOAD6]](s128)
34 ; CHECK-NEXT: $x0 = COPY [[TRUNC]](s64)
36 %1:_(s1) = G_LOAD %0(p0) :: (load (s1))
37 %2:_(s32) = G_ANYEXT %1(s1)
39 %3:_(s8) = G_LOAD %0(p0) :: (load (s8))
40 %4:_(s32) = G_ANYEXT %3(s8)
42 %5:_(s16) = G_LOAD %0(p0) :: (load (s16))
43 %6:_(s32) = G_ANYEXT %5(s16)
45 %7:_(s32) = G_LOAD %0(p0) :: (load (s32))
47 %8:_(s64) = G_LOAD %0(p0) :: (load (s64))
49 %9:_(p0) = G_LOAD %0(p0) :: (load (p0))
50 %10:_(s64) = G_PTRTOINT %9(p0)
52 %11:_(<2 x s32>) = G_LOAD %0(p0) :: (load (<2 x s32>))
53 %12:_(s64) = G_BITCAST %11(<2 x s32>)
55 %13:_(s128) = G_LOAD %0(p0) :: (load (s128))
56 %14:_(s64) = G_TRUNC %13(s128)
66 ; CHECK-LABEL: name: test_store
67 ; CHECK: liveins: $x0, $w1
69 ; CHECK-NEXT: [[COPY:%[0-9]+]]:_(p0) = COPY $x0
70 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:_(s32) = COPY $w1
71 ; CHECK-NEXT: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 1
72 ; CHECK-NEXT: [[AND:%[0-9]+]]:_(s32) = G_AND [[COPY1]], [[C]]
73 ; CHECK-NEXT: [[AND1:%[0-9]+]]:_(s32) = G_AND [[AND]], [[C]]
74 ; CHECK-NEXT: [[TRUNC:%[0-9]+]]:_(s8) = G_TRUNC [[AND1]](s32)
75 ; CHECK-NEXT: G_STORE [[TRUNC]](s8), [[COPY]](p0) :: (store (s8))
76 ; CHECK-NEXT: [[TRUNC1:%[0-9]+]]:_(s8) = G_TRUNC [[COPY1]](s32)
77 ; CHECK-NEXT: G_STORE [[TRUNC1]](s8), [[COPY]](p0) :: (store (s8))
78 ; CHECK-NEXT: [[TRUNC2:%[0-9]+]]:_(s16) = G_TRUNC [[COPY1]](s32)
79 ; CHECK-NEXT: G_STORE [[TRUNC2]](s16), [[COPY]](p0) :: (store (s16))
80 ; CHECK-NEXT: G_STORE [[COPY1]](s32), [[COPY]](p0) :: (store (s32))
81 ; CHECK-NEXT: [[PTRTOINT:%[0-9]+]]:_(s64) = G_PTRTOINT [[COPY]](p0)
82 ; CHECK-NEXT: G_STORE [[PTRTOINT]](s64), [[COPY]](p0) :: (store (s64))
83 ; CHECK-NEXT: G_STORE [[COPY]](p0), [[COPY]](p0) :: (store (p0))
84 ; CHECK-NEXT: [[PTRTOINT1:%[0-9]+]]:_(s64) = G_PTRTOINT [[COPY]](p0)
85 ; CHECK-NEXT: [[MV:%[0-9]+]]:_(s128) = G_MERGE_VALUES [[PTRTOINT1]](s64), [[PTRTOINT1]](s64)
86 ; CHECK-NEXT: G_STORE [[MV]](s128), [[COPY]](p0) :: (store (s128))
89 %2:_(s1) = G_TRUNC %1(s32)
90 G_STORE %2(s1), %0(p0) :: (store (s1))
91 %3:_(s8) = G_TRUNC %1(s32)
92 G_STORE %3(s8), %0(p0) :: (store (s8))
93 %4:_(s16) = G_TRUNC %1(s32)
94 G_STORE %4(s16), %0(p0) :: (store (s16))
95 G_STORE %1(s32), %0(p0) :: (store (s32))
96 %5:_(s64) = G_PTRTOINT %0(p0)
97 G_STORE %5(s64), %0(p0) :: (store (s64))
98 G_STORE %0(p0), %0(p0) :: (store (p0))
99 %6:_(s64) = G_PTRTOINT %0(p0)
100 %7:_(s128) = G_MERGE_VALUES %6(s64), %6
101 G_STORE %7(s128), %0(p0) :: (store (s128))
106 tracksRegLiveness: true
107 machineFunctionInfo: {}
112 ; CHECK-LABEL: name: store_4xi16
113 ; CHECK: liveins: $d0, $x0
115 ; CHECK-NEXT: [[COPY:%[0-9]+]]:_(<4 x s16>) = COPY $d0
116 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:_(p0) = COPY $x0
117 ; CHECK-NEXT: G_STORE [[COPY]](<4 x s16>), [[COPY1]](p0) :: (store (<4 x s16>))
118 ; CHECK-NEXT: RET_ReallyLR
119 %0:_(<4 x s16>) = COPY $d0
121 G_STORE %0(<4 x s16>), %1(p0) :: (store (<4 x s16>))
128 tracksRegLiveness: true
129 machineFunctionInfo: {}
134 ; CHECK-LABEL: name: store_4xi32
135 ; CHECK: liveins: $q0, $x0
137 ; CHECK-NEXT: [[COPY:%[0-9]+]]:_(<4 x s32>) = COPY $q0
138 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:_(p0) = COPY $x0
139 ; CHECK-NEXT: G_STORE [[COPY]](<4 x s32>), [[COPY1]](p0) :: (store (<4 x s32>))
140 ; CHECK-NEXT: RET_ReallyLR
141 %0:_(<4 x s32>) = COPY $q0
143 G_STORE %0(<4 x s32>), %1(p0) :: (store (<4 x s32>))
150 tracksRegLiveness: true
151 machineFunctionInfo: {}
156 ; CHECK-LABEL: name: store_8xi16
157 ; CHECK: liveins: $q0, $x0
159 ; CHECK-NEXT: [[COPY:%[0-9]+]]:_(<8 x s16>) = COPY $q0
160 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:_(p0) = COPY $x0
161 ; CHECK-NEXT: G_STORE [[COPY]](<8 x s16>), [[COPY1]](p0) :: (store (<8 x s16>))
162 ; CHECK-NEXT: RET_ReallyLR
163 %0:_(<8 x s16>) = COPY $q0
165 G_STORE %0(<8 x s16>), %1(p0) :: (store (<8 x s16>))
172 tracksRegLiveness: true
173 machineFunctionInfo: {}
178 ; CHECK-LABEL: name: store_16xi8
179 ; CHECK: liveins: $q0, $x0
181 ; CHECK-NEXT: [[COPY:%[0-9]+]]:_(<16 x s8>) = COPY $q0
182 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:_(p0) = COPY $x0
183 ; CHECK-NEXT: G_STORE [[COPY]](<16 x s8>), [[COPY1]](p0) :: (store (<16 x s8>))
184 ; CHECK-NEXT: RET_ReallyLR
185 %0:_(<16 x s8>) = COPY $q0
187 G_STORE %0(<16 x s8>), %1(p0) :: (store (<16 x s8>))
194 tracksRegLiveness: true
195 machineFunctionInfo: {}
200 ; CHECK-LABEL: name: load_4xi16
201 ; CHECK: liveins: $x0
203 ; CHECK-NEXT: [[COPY:%[0-9]+]]:_(p0) = COPY $x0
204 ; CHECK-NEXT: [[LOAD:%[0-9]+]]:_(<4 x s16>) = G_LOAD [[COPY]](p0) :: (load (<4 x s16>))
205 ; CHECK-NEXT: $d0 = COPY [[LOAD]](<4 x s16>)
206 ; CHECK-NEXT: RET_ReallyLR implicit $d0
208 %1:_(<4 x s16>) = G_LOAD %0(p0) :: (load (<4 x s16>))
209 $d0 = COPY %1(<4 x s16>)
210 RET_ReallyLR implicit $d0
216 tracksRegLiveness: true
217 machineFunctionInfo: {}
222 ; CHECK-LABEL: name: load_4xi32
223 ; CHECK: liveins: $x0
225 ; CHECK-NEXT: [[COPY:%[0-9]+]]:_(p0) = COPY $x0
226 ; CHECK-NEXT: [[LOAD:%[0-9]+]]:_(<4 x s32>) = G_LOAD [[COPY]](p0) :: (load (<4 x s32>))
227 ; CHECK-NEXT: $q0 = COPY [[LOAD]](<4 x s32>)
228 ; CHECK-NEXT: RET_ReallyLR implicit $q0
230 %1:_(<4 x s32>) = G_LOAD %0(p0) :: (load (<4 x s32>))
231 $q0 = COPY %1(<4 x s32>)
232 RET_ReallyLR implicit $q0
238 tracksRegLiveness: true
239 machineFunctionInfo: {}
244 ; CHECK-LABEL: name: load_8xi16
245 ; CHECK: liveins: $x0
247 ; CHECK-NEXT: [[COPY:%[0-9]+]]:_(p0) = COPY $x0
248 ; CHECK-NEXT: [[LOAD:%[0-9]+]]:_(<8 x s16>) = G_LOAD [[COPY]](p0) :: (load (<8 x s16>))
249 ; CHECK-NEXT: $q0 = COPY [[LOAD]](<8 x s16>)
250 ; CHECK-NEXT: RET_ReallyLR implicit $q0
252 %1:_(<8 x s16>) = G_LOAD %0(p0) :: (load (<8 x s16>))
253 $q0 = COPY %1(<8 x s16>)
254 RET_ReallyLR implicit $q0
260 tracksRegLiveness: true
261 machineFunctionInfo: {}
266 ; CHECK-LABEL: name: load_16xi8
267 ; CHECK: liveins: $x0
269 ; CHECK-NEXT: [[COPY:%[0-9]+]]:_(p0) = COPY $x0
270 ; CHECK-NEXT: [[LOAD:%[0-9]+]]:_(<16 x s8>) = G_LOAD [[COPY]](p0) :: (load (<16 x s8>))
271 ; CHECK-NEXT: $q0 = COPY [[LOAD]](<16 x s8>)
272 ; CHECK-NEXT: RET_ReallyLR implicit $q0
274 %1:_(<16 x s8>) = G_LOAD %0(p0) :: (load (<16 x s8>))
275 $q0 = COPY %1(<16 x s8>)
276 RET_ReallyLR implicit $q0
282 tracksRegLiveness: true
283 machineFunctionInfo: {}
287 ; CHECK-LABEL: name: load_8xi8
288 ; CHECK: liveins: $x0
290 ; CHECK-NEXT: [[COPY:%[0-9]+]]:_(p0) = COPY $x0
291 ; CHECK-NEXT: [[LOAD:%[0-9]+]]:_(<8 x s8>) = G_LOAD [[COPY]](p0) :: (load (<8 x s8>))
292 ; CHECK-NEXT: $d0 = COPY [[LOAD]](<8 x s8>)
293 ; CHECK-NEXT: RET_ReallyLR implicit $d0
295 %1:_(<8 x s8>) = G_LOAD %0(p0) :: (load (<8 x s8>))
296 $d0 = COPY %1(<8 x s8>)
297 RET_ReallyLR implicit $d0
303 tracksRegLiveness: true
304 machineFunctionInfo: {}
308 ; CHECK-LABEL: name: store_8xi8
309 ; CHECK: liveins: $x0, $d0
311 ; CHECK-NEXT: [[COPY:%[0-9]+]]:_(p0) = COPY $x0
312 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:_(<8 x s8>) = COPY $d0
313 ; CHECK-NEXT: G_STORE [[COPY1]](<8 x s8>), [[COPY]](p0) :: (store (<8 x s8>))
314 ; CHECK-NEXT: RET_ReallyLR
316 %1:_(<8 x s8>) = COPY $d0
317 G_STORE %1(<8 x s8>), %0(p0) :: (store (<8 x s8>))
323 tracksRegLiveness: true
324 machineFunctionInfo: {}
328 ; CHECK-LABEL: name: store_32xs8
329 ; CHECK: liveins: $x0
331 ; CHECK-NEXT: [[DEF:%[0-9]+]]:_(<16 x s8>) = G_IMPLICIT_DEF
332 ; CHECK-NEXT: %ptr:_(p0) = COPY $x0
333 ; CHECK-NEXT: G_STORE [[DEF]](<16 x s8>), %ptr(p0) :: (store (<16 x s8>), align 32)
334 ; CHECK-NEXT: [[C:%[0-9]+]]:_(s64) = G_CONSTANT i64 16
335 ; CHECK-NEXT: [[PTR_ADD:%[0-9]+]]:_(p0) = G_PTR_ADD %ptr, [[C]](s64)
336 ; CHECK-NEXT: G_STORE [[DEF]](<16 x s8>), [[PTR_ADD]](p0) :: (store (<16 x s8>) into unknown-address + 16)
337 ; CHECK-NEXT: RET_ReallyLR
338 %val:_(<32 x s8>) = G_IMPLICIT_DEF
339 %ptr:_(p0) = COPY $x0
340 G_STORE %val(<32 x s8>), %ptr(p0) :: (store (<32 x s8>))
346 tracksRegLiveness: true
347 machineFunctionInfo: {}
351 ; CHECK-LABEL: name: store_16xs16
352 ; CHECK: liveins: $x0
354 ; CHECK-NEXT: [[DEF:%[0-9]+]]:_(<8 x s16>) = G_IMPLICIT_DEF
355 ; CHECK-NEXT: %ptr:_(p0) = COPY $x0
356 ; CHECK-NEXT: G_STORE [[DEF]](<8 x s16>), %ptr(p0) :: (store (<8 x s16>), align 32)
357 ; CHECK-NEXT: [[C:%[0-9]+]]:_(s64) = G_CONSTANT i64 16
358 ; CHECK-NEXT: [[PTR_ADD:%[0-9]+]]:_(p0) = G_PTR_ADD %ptr, [[C]](s64)
359 ; CHECK-NEXT: G_STORE [[DEF]](<8 x s16>), [[PTR_ADD]](p0) :: (store (<8 x s16>) into unknown-address + 16)
360 ; CHECK-NEXT: RET_ReallyLR
361 %val:_(<16 x s16>) = G_IMPLICIT_DEF
362 %ptr:_(p0) = COPY $x0
363 G_STORE %val(<16 x s16>), %ptr(p0) :: (store (<16 x s16>))
369 tracksRegLiveness: true
370 machineFunctionInfo: {}
374 ; CHECK-LABEL: name: store_8xs32
375 ; CHECK: liveins: $x0
377 ; CHECK-NEXT: [[DEF:%[0-9]+]]:_(<4 x s32>) = G_IMPLICIT_DEF
378 ; CHECK-NEXT: %ptr:_(p0) = COPY $x0
379 ; CHECK-NEXT: G_STORE [[DEF]](<4 x s32>), %ptr(p0) :: (store (<4 x s32>), align 32)
380 ; CHECK-NEXT: [[C:%[0-9]+]]:_(s64) = G_CONSTANT i64 16
381 ; CHECK-NEXT: [[PTR_ADD:%[0-9]+]]:_(p0) = G_PTR_ADD %ptr, [[C]](s64)
382 ; CHECK-NEXT: G_STORE [[DEF]](<4 x s32>), [[PTR_ADD]](p0) :: (store (<4 x s32>) into unknown-address + 16)
383 ; CHECK-NEXT: RET_ReallyLR
384 %val:_(<8 x s32>) = G_IMPLICIT_DEF
385 %ptr:_(p0) = COPY $x0
386 G_STORE %val(<8 x s32>), %ptr(p0) :: (store (<8 x s32>))
392 tracksRegLiveness: true
393 machineFunctionInfo: {}
397 ; CHECK-LABEL: name: store_4xs64
398 ; CHECK: liveins: $x0
400 ; CHECK-NEXT: [[DEF:%[0-9]+]]:_(<2 x s64>) = G_IMPLICIT_DEF
401 ; CHECK-NEXT: %ptr:_(p0) = COPY $x0
402 ; CHECK-NEXT: G_STORE [[DEF]](<2 x s64>), %ptr(p0) :: (store (<2 x s64>), align 32)
403 ; CHECK-NEXT: [[C:%[0-9]+]]:_(s64) = G_CONSTANT i64 16
404 ; CHECK-NEXT: [[PTR_ADD:%[0-9]+]]:_(p0) = G_PTR_ADD %ptr, [[C]](s64)
405 ; CHECK-NEXT: G_STORE [[DEF]](<2 x s64>), [[PTR_ADD]](p0) :: (store (<2 x s64>) into unknown-address + 16)
406 ; CHECK-NEXT: RET_ReallyLR
407 %val:_(<4 x s64>) = G_IMPLICIT_DEF
408 %ptr:_(p0) = COPY $x0
409 G_STORE %val(<4 x s64>), %ptr(p0) :: (store (<4 x s64>))
415 tracksRegLiveness: true
416 machineFunctionInfo: {}
420 ; CHECK-LABEL: name: load_32xs8
421 ; CHECK: liveins: $x0
423 ; CHECK-NEXT: %ptr:_(p0) = COPY $x0
424 ; CHECK-NEXT: [[LOAD:%[0-9]+]]:_(<16 x s8>) = G_LOAD %ptr(p0) :: (load (<16 x s8>), align 32)
425 ; CHECK-NEXT: [[C:%[0-9]+]]:_(s64) = G_CONSTANT i64 16
426 ; CHECK-NEXT: [[PTR_ADD:%[0-9]+]]:_(p0) = G_PTR_ADD %ptr, [[C]](s64)
427 ; CHECK-NEXT: [[LOAD1:%[0-9]+]]:_(<16 x s8>) = G_LOAD [[PTR_ADD]](p0) :: (load (<16 x s8>) from unknown-address + 16)
428 ; CHECK-NEXT: G_STORE [[LOAD]](<16 x s8>), %ptr(p0) :: (store (<16 x s8>), align 32)
429 ; CHECK-NEXT: [[PTR_ADD1:%[0-9]+]]:_(p0) = G_PTR_ADD %ptr, [[C]](s64)
430 ; CHECK-NEXT: G_STORE [[LOAD1]](<16 x s8>), [[PTR_ADD1]](p0) :: (store (<16 x s8>) into unknown-address + 16)
431 ; CHECK-NEXT: RET_ReallyLR
432 %ptr:_(p0) = COPY $x0
433 %val:_(<32 x s8>) = G_LOAD %ptr(p0) :: (load (<32 x s8>))
434 G_STORE %val(<32 x s8>), %ptr(p0) :: (store (<32 x s8>))
440 tracksRegLiveness: true
441 machineFunctionInfo: {}
445 ; CHECK-LABEL: name: load_16xs16
446 ; CHECK: liveins: $x0
448 ; CHECK-NEXT: %ptr:_(p0) = COPY $x0
449 ; CHECK-NEXT: [[LOAD:%[0-9]+]]:_(<8 x s16>) = G_LOAD %ptr(p0) :: (load (<8 x s16>), align 32)
450 ; CHECK-NEXT: [[C:%[0-9]+]]:_(s64) = G_CONSTANT i64 16
451 ; CHECK-NEXT: [[PTR_ADD:%[0-9]+]]:_(p0) = G_PTR_ADD %ptr, [[C]](s64)
452 ; CHECK-NEXT: [[LOAD1:%[0-9]+]]:_(<8 x s16>) = G_LOAD [[PTR_ADD]](p0) :: (load (<8 x s16>) from unknown-address + 16)
453 ; CHECK-NEXT: G_STORE [[LOAD]](<8 x s16>), %ptr(p0) :: (store (<8 x s16>), align 32)
454 ; CHECK-NEXT: [[PTR_ADD1:%[0-9]+]]:_(p0) = G_PTR_ADD %ptr, [[C]](s64)
455 ; CHECK-NEXT: G_STORE [[LOAD1]](<8 x s16>), [[PTR_ADD1]](p0) :: (store (<8 x s16>) into unknown-address + 16)
456 ; CHECK-NEXT: RET_ReallyLR
457 %ptr:_(p0) = COPY $x0
458 %val:_(<16 x s16>) = G_LOAD %ptr(p0) :: (load (<16 x s16>))
459 G_STORE %val(<16 x s16>), %ptr(p0) :: (store (<16 x s16>))
465 tracksRegLiveness: true
466 machineFunctionInfo: {}
470 ; CHECK-LABEL: name: load_8xs32
471 ; CHECK: liveins: $x0
473 ; CHECK-NEXT: %ptr:_(p0) = COPY $x0
474 ; CHECK-NEXT: [[LOAD:%[0-9]+]]:_(<4 x s32>) = G_LOAD %ptr(p0) :: (load (<4 x s32>), align 32)
475 ; CHECK-NEXT: [[C:%[0-9]+]]:_(s64) = G_CONSTANT i64 16
476 ; CHECK-NEXT: [[PTR_ADD:%[0-9]+]]:_(p0) = G_PTR_ADD %ptr, [[C]](s64)
477 ; CHECK-NEXT: [[LOAD1:%[0-9]+]]:_(<4 x s32>) = G_LOAD [[PTR_ADD]](p0) :: (load (<4 x s32>) from unknown-address + 16)
478 ; CHECK-NEXT: G_STORE [[LOAD]](<4 x s32>), %ptr(p0) :: (store (<4 x s32>), align 32)
479 ; CHECK-NEXT: [[PTR_ADD1:%[0-9]+]]:_(p0) = G_PTR_ADD %ptr, [[C]](s64)
480 ; CHECK-NEXT: G_STORE [[LOAD1]](<4 x s32>), [[PTR_ADD1]](p0) :: (store (<4 x s32>) into unknown-address + 16)
481 ; CHECK-NEXT: RET_ReallyLR
482 %ptr:_(p0) = COPY $x0
483 %val:_(<8 x s32>) = G_LOAD %ptr(p0) :: (load (<8 x s32>))
484 G_STORE %val(<8 x s32>), %ptr(p0) :: (store (<8 x s32>))
490 tracksRegLiveness: true
491 machineFunctionInfo: {}
495 ; CHECK-LABEL: name: load_4xs64
496 ; CHECK: liveins: $x0
498 ; CHECK-NEXT: %ptr:_(p0) = COPY $x0
499 ; CHECK-NEXT: [[LOAD:%[0-9]+]]:_(<2 x s64>) = G_LOAD %ptr(p0) :: (load (<2 x s64>), align 32)
500 ; CHECK-NEXT: [[C:%[0-9]+]]:_(s64) = G_CONSTANT i64 16
501 ; CHECK-NEXT: [[PTR_ADD:%[0-9]+]]:_(p0) = G_PTR_ADD %ptr, [[C]](s64)
502 ; CHECK-NEXT: [[LOAD1:%[0-9]+]]:_(<2 x s64>) = G_LOAD [[PTR_ADD]](p0) :: (load (<2 x s64>) from unknown-address + 16)
503 ; CHECK-NEXT: G_STORE [[LOAD]](<2 x s64>), %ptr(p0) :: (store (<2 x s64>), align 32)
504 ; CHECK-NEXT: [[PTR_ADD1:%[0-9]+]]:_(p0) = G_PTR_ADD %ptr, [[C]](s64)
505 ; CHECK-NEXT: G_STORE [[LOAD1]](<2 x s64>), [[PTR_ADD1]](p0) :: (store (<2 x s64>) into unknown-address + 16)
506 ; CHECK-NEXT: RET_ReallyLR
507 %ptr:_(p0) = COPY $x0
508 %val:_(<4 x s64>) = G_LOAD %ptr(p0) :: (load (<4 x s64>))
509 G_STORE %val(<4 x s64>), %ptr(p0) :: (store (<4 x s64>))
513 name: test_trunc_store
518 ; CHECK-LABEL: name: test_trunc_store
519 ; CHECK: liveins: $x0, $w1
521 ; CHECK-NEXT: [[COPY:%[0-9]+]]:_(p0) = COPY $x0
522 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:_(s32) = COPY $w1
523 ; CHECK-NEXT: %val64:_(s64) = COPY $x2
524 ; CHECK-NEXT: G_STORE [[COPY1]](s32), [[COPY]](p0) :: (store (s8))
525 ; CHECK-NEXT: G_STORE [[COPY1]](s32), [[COPY]](p0) :: (store (s16))
526 ; CHECK-NEXT: G_STORE %val64(s64), [[COPY]](p0) :: (store (s8))
527 ; CHECK-NEXT: G_STORE %val64(s64), [[COPY]](p0) :: (store (s16))
528 ; CHECK-NEXT: G_STORE %val64(s64), [[COPY]](p0) :: (store (s32))
531 %2:_(s8) = G_TRUNC %1(s32)
532 %val64:_(s64) = COPY $x2
533 G_STORE %1(s32), %0(p0) :: (store (s8))
534 G_STORE %1(s32), %0(p0) :: (store (s16))
535 G_STORE %val64(s64), %0(p0) :: (store (s8))
536 G_STORE %val64(s64), %0(p0) :: (store (s16))
537 G_STORE %val64(s64), %0(p0) :: (store (s32))
541 tracksRegLiveness: true
545 ; CHECK-LABEL: name: store_6xs64
546 ; CHECK: liveins: $x0
548 ; CHECK-NEXT: [[DEF:%[0-9]+]]:_(<2 x s64>) = G_IMPLICIT_DEF
549 ; CHECK-NEXT: %ptr:_(p0) = COPY $x0
550 ; CHECK-NEXT: G_STORE [[DEF]](<2 x s64>), %ptr(p0) :: (store (<2 x s64>))
551 ; CHECK-NEXT: [[C:%[0-9]+]]:_(s64) = G_CONSTANT i64 16
552 ; CHECK-NEXT: [[PTR_ADD:%[0-9]+]]:_(p0) = G_PTR_ADD %ptr, [[C]](s64)
553 ; CHECK-NEXT: G_STORE [[DEF]](<2 x s64>), [[PTR_ADD]](p0) :: (store (<2 x s64>) into unknown-address + 16)
554 ; CHECK-NEXT: [[C1:%[0-9]+]]:_(s64) = G_CONSTANT i64 32
555 ; CHECK-NEXT: [[PTR_ADD1:%[0-9]+]]:_(p0) = G_PTR_ADD %ptr, [[C1]](s64)
556 ; CHECK-NEXT: G_STORE [[DEF]](<2 x s64>), [[PTR_ADD1]](p0) :: (store (<2 x s64>) into unknown-address + 32)
557 ; CHECK-NEXT: RET_ReallyLR
558 %val:_(<6 x s64>) = G_IMPLICIT_DEF
559 %ptr:_(p0) = COPY $x0
560 G_STORE %val(<6 x s64>), %ptr(p0) :: (store (<6 x s64>), align 16)
565 tracksRegLiveness: true
570 ; CHECK-LABEL: name: store_2xi16
571 ; CHECK: liveins: $s0, $x0
573 ; CHECK-NEXT: [[COPY:%[0-9]+]]:_(p0) = COPY $x0
574 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:_(<2 x s16>) = COPY $s0
575 ; CHECK-NEXT: [[UV:%[0-9]+]]:_(s16), [[UV1:%[0-9]+]]:_(s16) = G_UNMERGE_VALUES [[COPY1]](<2 x s16>)
576 ; CHECK-NEXT: G_STORE [[UV]](s16), [[COPY]](p0) :: (store (s16), align 4)
577 ; CHECK-NEXT: [[C:%[0-9]+]]:_(s64) = G_CONSTANT i64 2
578 ; CHECK-NEXT: [[PTR_ADD:%[0-9]+]]:_(p0) = G_PTR_ADD [[COPY]], [[C]](s64)
579 ; CHECK-NEXT: G_STORE [[UV1]](s16), [[PTR_ADD]](p0) :: (store (s16) into unknown-address + 2)
580 ; CHECK-NEXT: RET_ReallyLR
582 %1:_(<2 x s16>) = COPY $s0
583 G_STORE %1(<2 x s16>), %0(p0) :: (store (<2 x s16>))
589 tracksRegLiveness: true
594 ; CHECK-LABEL: name: load_2xi16
595 ; CHECK: liveins: $s0, $x0
597 ; CHECK-NEXT: [[COPY:%[0-9]+]]:_(p0) = COPY $x0
598 ; CHECK-NEXT: [[LOAD:%[0-9]+]]:_(s16) = G_LOAD [[COPY]](p0) :: (load (s16), align 4)
599 ; CHECK-NEXT: [[C:%[0-9]+]]:_(s64) = G_CONSTANT i64 2
600 ; CHECK-NEXT: [[PTR_ADD:%[0-9]+]]:_(p0) = G_PTR_ADD [[COPY]], [[C]](s64)
601 ; CHECK-NEXT: [[LOAD1:%[0-9]+]]:_(s16) = G_LOAD [[PTR_ADD]](p0) :: (load (s16) from unknown-address + 2)
602 ; CHECK-NEXT: [[ANYEXT:%[0-9]+]]:_(s32) = G_ANYEXT [[LOAD]](s16)
603 ; CHECK-NEXT: [[ANYEXT1:%[0-9]+]]:_(s32) = G_ANYEXT [[LOAD1]](s16)
604 ; CHECK-NEXT: [[DEF:%[0-9]+]]:_(s32) = G_IMPLICIT_DEF
605 ; CHECK-NEXT: [[BUILD_VECTOR:%[0-9]+]]:_(<4 x s32>) = G_BUILD_VECTOR [[ANYEXT]](s32), [[ANYEXT1]](s32), [[DEF]](s32), [[DEF]](s32)
606 ; CHECK-NEXT: [[TRUNC:%[0-9]+]]:_(<4 x s16>) = G_TRUNC [[BUILD_VECTOR]](<4 x s32>)
607 ; CHECK-NEXT: [[UV:%[0-9]+]]:_(<2 x s16>), [[UV1:%[0-9]+]]:_(<2 x s16>) = G_UNMERGE_VALUES [[TRUNC]](<4 x s16>)
608 ; CHECK-NEXT: $s0 = COPY [[UV]](<2 x s16>)
609 ; CHECK-NEXT: RET_ReallyLR
611 %1(<2 x s16>) = G_LOAD %0(p0) :: (load (<2 x s16>))
612 $s0 = COPY %1:_(<2 x s16>)
617 name: load_store_s88_s88_mem_size
618 tracksRegLiveness: true
622 ; CHECK-LABEL: name: load_store_s88_s88_mem_size
623 ; CHECK: liveins: $x0
625 ; CHECK-NEXT: %ptr:_(p0) = COPY $x0
626 ; CHECK-NEXT: [[LOAD:%[0-9]+]]:_(s64) = G_LOAD %ptr(p0) :: (load (s64), align 16)
627 ; CHECK-NEXT: [[C:%[0-9]+]]:_(s64) = G_CONSTANT i64 0
628 ; CHECK-NEXT: [[C1:%[0-9]+]]:_(s64) = G_CONSTANT i64 8
629 ; CHECK-NEXT: [[PTR_ADD:%[0-9]+]]:_(p0) = G_PTR_ADD %ptr, [[C1]](s64)
630 ; CHECK-NEXT: [[ZEXTLOAD:%[0-9]+]]:_(s64) = G_ZEXTLOAD [[PTR_ADD]](p0) :: (load (s16) from unknown-address + 8, align 8)
631 ; CHECK-NEXT: [[C2:%[0-9]+]]:_(s64) = G_CONSTANT i64 2
632 ; CHECK-NEXT: [[PTR_ADD1:%[0-9]+]]:_(p0) = G_PTR_ADD [[PTR_ADD]], [[C2]](s64)
633 ; CHECK-NEXT: [[LOAD1:%[0-9]+]]:_(s32) = G_LOAD [[PTR_ADD1]](p0) :: (load (s8) from unknown-address + 10, align 2)
634 ; CHECK-NEXT: [[DEF:%[0-9]+]]:_(s32) = G_IMPLICIT_DEF
635 ; CHECK-NEXT: [[MV:%[0-9]+]]:_(s64) = G_MERGE_VALUES [[LOAD1]](s32), [[DEF]](s32)
636 ; CHECK-NEXT: [[C3:%[0-9]+]]:_(s64) = G_CONSTANT i64 16
637 ; CHECK-NEXT: [[SHL:%[0-9]+]]:_(s64) = G_SHL [[MV]], [[C3]](s64)
638 ; CHECK-NEXT: [[OR:%[0-9]+]]:_(s64) = G_OR [[SHL]], [[ZEXTLOAD]]
639 ; CHECK-NEXT: [[OR1:%[0-9]+]]:_(s64) = G_OR [[C]], [[LOAD]]
640 ; CHECK-NEXT: [[OR2:%[0-9]+]]:_(s64) = G_OR [[OR]], [[C]]
641 ; CHECK-NEXT: [[COPY:%[0-9]+]]:_(s64) = COPY [[OR1]](s64)
642 ; CHECK-NEXT: [[TRUNC:%[0-9]+]]:_(s32) = G_TRUNC [[OR2]](s64)
643 ; CHECK-NEXT: G_STORE [[COPY]](s64), %ptr(p0) :: (store (s64), align 16)
644 ; CHECK-NEXT: [[PTR_ADD2:%[0-9]+]]:_(p0) = G_PTR_ADD %ptr, [[C1]](s64)
645 ; CHECK-NEXT: [[LSHR:%[0-9]+]]:_(s32) = G_LSHR [[TRUNC]], [[C3]](s64)
646 ; CHECK-NEXT: [[PTR_ADD3:%[0-9]+]]:_(p0) = G_PTR_ADD [[PTR_ADD2]], [[C2]](s64)
647 ; CHECK-NEXT: G_STORE [[TRUNC]](s32), [[PTR_ADD2]](p0) :: (store (s16) into unknown-address + 8, align 8)
648 ; CHECK-NEXT: G_STORE [[LSHR]](s32), [[PTR_ADD3]](p0) :: (store (s8) into unknown-address + 10, align 2)
649 ; CHECK-NEXT: RET_ReallyLR
650 %ptr:_(p0) = COPY $x0
651 %load:_(s88) = G_LOAD %ptr(p0) :: (load (s88))
652 G_STORE %load(s88), %ptr(p0) :: (store (s88))
656 name: load_store_s88_s64_mem_size
657 tracksRegLiveness: true
661 ; CHECK-LABEL: name: load_store_s88_s64_mem_size
662 ; CHECK: liveins: $x0
664 ; CHECK-NEXT: %ptr:_(p0) = COPY $x0
665 ; CHECK-NEXT: [[LOAD:%[0-9]+]]:_(s64) = G_LOAD %ptr(p0) :: (load (s64))
666 ; CHECK-NEXT: G_STORE [[LOAD]](s64), %ptr(p0) :: (store (s64))
667 ; CHECK-NEXT: RET_ReallyLR
668 %ptr:_(p0) = COPY $x0
669 %load:_(s88) = G_LOAD %ptr(p0) :: (load (s64))
670 G_STORE %load(s88), %ptr(p0) :: (store (s64))
676 tracksRegLiveness: true
677 machineFunctionInfo: {}
681 ; CHECK-LABEL: name: load_s1
682 ; CHECK: liveins: $x0
684 ; CHECK-NEXT: %ptr:_(p0) = COPY $x0
685 ; CHECK-NEXT: [[LOAD:%[0-9]+]]:_(s8) = G_LOAD %ptr(p0) :: (load (s8))
686 ; CHECK-NEXT: [[ASSERT_ZEXT:%[0-9]+]]:_(s8) = G_ASSERT_ZEXT [[LOAD]], 1
687 ; CHECK-NEXT: [[ANYEXT:%[0-9]+]]:_(s64) = G_ANYEXT [[ASSERT_ZEXT]](s8)
688 ; CHECK-NEXT: [[C:%[0-9]+]]:_(s64) = G_CONSTANT i64 1
689 ; CHECK-NEXT: %ext:_(s64) = G_AND [[ANYEXT]], [[C]]
690 ; CHECK-NEXT: $x0 = COPY %ext(s64)
691 ; CHECK-NEXT: RET_ReallyLR implicit $x0
692 %ptr:_(p0) = COPY $x0
693 %load:_(s1) = G_LOAD %ptr(p0) :: (load (s1))
694 %ext:_(s64) = G_ZEXT %load
696 RET_ReallyLR implicit $x0
699 name: load_store_6xp0
701 tracksRegLiveness: true
702 machineFunctionInfo: {}
706 ; CHECK-LABEL: name: load_store_6xp0
707 ; CHECK: liveins: $x0
709 ; CHECK-NEXT: %ptr:_(p0) = COPY $x0
710 ; CHECK-NEXT: [[LOAD:%[0-9]+]]:_(<2 x s64>) = G_LOAD %ptr(p0) :: (load (<2 x s64>), align 64)
711 ; CHECK-NEXT: [[BITCAST:%[0-9]+]]:_(<2 x p0>) = G_BITCAST [[LOAD]](<2 x s64>)
712 ; CHECK-NEXT: [[C:%[0-9]+]]:_(s64) = G_CONSTANT i64 16
713 ; CHECK-NEXT: [[PTR_ADD:%[0-9]+]]:_(p0) = G_PTR_ADD %ptr, [[C]](s64)
714 ; CHECK-NEXT: [[LOAD1:%[0-9]+]]:_(<2 x s64>) = G_LOAD [[PTR_ADD]](p0) :: (load (<2 x s64>) from unknown-address + 16)
715 ; CHECK-NEXT: [[BITCAST1:%[0-9]+]]:_(<2 x p0>) = G_BITCAST [[LOAD1]](<2 x s64>)
716 ; CHECK-NEXT: [[C1:%[0-9]+]]:_(s64) = G_CONSTANT i64 32
717 ; CHECK-NEXT: [[PTR_ADD1:%[0-9]+]]:_(p0) = G_PTR_ADD %ptr, [[C1]](s64)
718 ; CHECK-NEXT: [[LOAD2:%[0-9]+]]:_(<2 x s64>) = G_LOAD [[PTR_ADD1]](p0) :: (load (<2 x s64>) from unknown-address + 32, align 32)
719 ; CHECK-NEXT: [[BITCAST2:%[0-9]+]]:_(<2 x p0>) = G_BITCAST [[LOAD2]](<2 x s64>)
720 ; CHECK-NEXT: [[BITCAST3:%[0-9]+]]:_(<2 x s64>) = G_BITCAST [[BITCAST]](<2 x p0>)
721 ; CHECK-NEXT: G_STORE [[BITCAST3]](<2 x s64>), %ptr(p0) :: (store (<2 x s64>), align 64)
722 ; CHECK-NEXT: [[PTR_ADD2:%[0-9]+]]:_(p0) = G_PTR_ADD %ptr, [[C]](s64)
723 ; CHECK-NEXT: [[BITCAST4:%[0-9]+]]:_(<2 x s64>) = G_BITCAST [[BITCAST1]](<2 x p0>)
724 ; CHECK-NEXT: G_STORE [[BITCAST4]](<2 x s64>), [[PTR_ADD2]](p0) :: (store (<2 x s64>) into unknown-address + 16)
725 ; CHECK-NEXT: [[PTR_ADD3:%[0-9]+]]:_(p0) = G_PTR_ADD %ptr, [[C1]](s64)
726 ; CHECK-NEXT: [[BITCAST5:%[0-9]+]]:_(<2 x s64>) = G_BITCAST [[BITCAST2]](<2 x p0>)
727 ; CHECK-NEXT: G_STORE [[BITCAST5]](<2 x s64>), [[PTR_ADD3]](p0) :: (store (<2 x s64>) into unknown-address + 32, align 32)
728 ; CHECK-NEXT: RET_ReallyLR
729 %ptr:_(p0) = COPY $x0
730 %val:_(<6 x p0>) = G_LOAD %ptr(p0) :: (load (<6 x p0>))
731 G_STORE %val(<6 x p0>), %ptr(p0) :: (store (<6 x p0>))