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]+]]:_(s8) = G_IMPLICIT_DEF
332 ; CHECK-NEXT: [[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)
333 ; CHECK-NEXT: [[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)
334 ; CHECK-NEXT: %ptr:_(p0) = COPY $x0
335 ; CHECK-NEXT: G_STORE [[BUILD_VECTOR]](<16 x s8>), %ptr(p0) :: (store (<16 x s8>), align 32)
336 ; CHECK-NEXT: [[C:%[0-9]+]]:_(s64) = G_CONSTANT i64 16
337 ; CHECK-NEXT: [[PTR_ADD:%[0-9]+]]:_(p0) = G_PTR_ADD %ptr, [[C]](s64)
338 ; CHECK-NEXT: G_STORE [[BUILD_VECTOR1]](<16 x s8>), [[PTR_ADD]](p0) :: (store (<16 x s8>) into unknown-address + 16)
339 ; CHECK-NEXT: RET_ReallyLR
340 %val:_(<32 x s8>) = G_IMPLICIT_DEF
341 %ptr:_(p0) = COPY $x0
342 G_STORE %val(<32 x s8>), %ptr(p0) :: (store (<32 x s8>))
348 tracksRegLiveness: true
349 machineFunctionInfo: {}
353 ; CHECK-LABEL: name: store_16xs16
354 ; CHECK: liveins: $x0
356 ; CHECK-NEXT: [[DEF:%[0-9]+]]:_(s16) = G_IMPLICIT_DEF
357 ; CHECK-NEXT: [[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)
358 ; CHECK-NEXT: [[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)
359 ; CHECK-NEXT: %ptr:_(p0) = COPY $x0
360 ; CHECK-NEXT: G_STORE [[BUILD_VECTOR]](<8 x s16>), %ptr(p0) :: (store (<8 x s16>), align 32)
361 ; CHECK-NEXT: [[C:%[0-9]+]]:_(s64) = G_CONSTANT i64 16
362 ; CHECK-NEXT: [[PTR_ADD:%[0-9]+]]:_(p0) = G_PTR_ADD %ptr, [[C]](s64)
363 ; CHECK-NEXT: G_STORE [[BUILD_VECTOR1]](<8 x s16>), [[PTR_ADD]](p0) :: (store (<8 x s16>) into unknown-address + 16)
364 ; CHECK-NEXT: RET_ReallyLR
365 %val:_(<16 x s16>) = G_IMPLICIT_DEF
366 %ptr:_(p0) = COPY $x0
367 G_STORE %val(<16 x s16>), %ptr(p0) :: (store (<16 x s16>))
373 tracksRegLiveness: true
374 machineFunctionInfo: {}
378 ; CHECK-LABEL: name: store_8xs32
379 ; CHECK: liveins: $x0
381 ; CHECK-NEXT: [[DEF:%[0-9]+]]:_(s32) = G_IMPLICIT_DEF
382 ; CHECK-NEXT: [[BUILD_VECTOR:%[0-9]+]]:_(<4 x s32>) = G_BUILD_VECTOR [[DEF]](s32), [[DEF]](s32), [[DEF]](s32), [[DEF]](s32)
383 ; CHECK-NEXT: [[BUILD_VECTOR1:%[0-9]+]]:_(<4 x s32>) = G_BUILD_VECTOR [[DEF]](s32), [[DEF]](s32), [[DEF]](s32), [[DEF]](s32)
384 ; CHECK-NEXT: %ptr:_(p0) = COPY $x0
385 ; CHECK-NEXT: G_STORE [[BUILD_VECTOR]](<4 x s32>), %ptr(p0) :: (store (<4 x s32>), align 32)
386 ; CHECK-NEXT: [[C:%[0-9]+]]:_(s64) = G_CONSTANT i64 16
387 ; CHECK-NEXT: [[PTR_ADD:%[0-9]+]]:_(p0) = G_PTR_ADD %ptr, [[C]](s64)
388 ; CHECK-NEXT: G_STORE [[BUILD_VECTOR1]](<4 x s32>), [[PTR_ADD]](p0) :: (store (<4 x s32>) into unknown-address + 16)
389 ; CHECK-NEXT: RET_ReallyLR
390 %val:_(<8 x s32>) = G_IMPLICIT_DEF
391 %ptr:_(p0) = COPY $x0
392 G_STORE %val(<8 x s32>), %ptr(p0) :: (store (<8 x s32>))
398 tracksRegLiveness: true
399 machineFunctionInfo: {}
403 ; CHECK-LABEL: name: store_4xs64
404 ; CHECK: liveins: $x0
406 ; CHECK-NEXT: [[DEF:%[0-9]+]]:_(<2 x s64>) = G_IMPLICIT_DEF
407 ; CHECK-NEXT: %ptr:_(p0) = COPY $x0
408 ; CHECK-NEXT: G_STORE [[DEF]](<2 x s64>), %ptr(p0) :: (store (<2 x s64>), align 32)
409 ; CHECK-NEXT: [[C:%[0-9]+]]:_(s64) = G_CONSTANT i64 16
410 ; CHECK-NEXT: [[PTR_ADD:%[0-9]+]]:_(p0) = G_PTR_ADD %ptr, [[C]](s64)
411 ; CHECK-NEXT: G_STORE [[DEF]](<2 x s64>), [[PTR_ADD]](p0) :: (store (<2 x s64>) into unknown-address + 16)
412 ; CHECK-NEXT: RET_ReallyLR
413 %val:_(<4 x s64>) = G_IMPLICIT_DEF
414 %ptr:_(p0) = COPY $x0
415 G_STORE %val(<4 x s64>), %ptr(p0) :: (store (<4 x s64>))
421 tracksRegLiveness: true
422 machineFunctionInfo: {}
426 ; CHECK-LABEL: name: load_32xs8
427 ; CHECK: liveins: $x0
429 ; CHECK-NEXT: %ptr:_(p0) = COPY $x0
430 ; CHECK-NEXT: [[LOAD:%[0-9]+]]:_(<16 x s8>) = G_LOAD %ptr(p0) :: (load (<16 x s8>), align 32)
431 ; CHECK-NEXT: [[C:%[0-9]+]]:_(s64) = G_CONSTANT i64 16
432 ; CHECK-NEXT: [[PTR_ADD:%[0-9]+]]:_(p0) = G_PTR_ADD %ptr, [[C]](s64)
433 ; CHECK-NEXT: [[LOAD1:%[0-9]+]]:_(<16 x s8>) = G_LOAD [[PTR_ADD]](p0) :: (load (<16 x s8>) from unknown-address + 16)
434 ; CHECK-NEXT: G_STORE [[LOAD]](<16 x s8>), %ptr(p0) :: (store (<16 x s8>), align 32)
435 ; CHECK-NEXT: [[PTR_ADD1:%[0-9]+]]:_(p0) = G_PTR_ADD %ptr, [[C]](s64)
436 ; CHECK-NEXT: G_STORE [[LOAD1]](<16 x s8>), [[PTR_ADD1]](p0) :: (store (<16 x s8>) into unknown-address + 16)
437 ; CHECK-NEXT: RET_ReallyLR
438 %ptr:_(p0) = COPY $x0
439 %val:_(<32 x s8>) = G_LOAD %ptr(p0) :: (load (<32 x s8>))
440 G_STORE %val(<32 x s8>), %ptr(p0) :: (store (<32 x s8>))
446 tracksRegLiveness: true
447 machineFunctionInfo: {}
451 ; CHECK-LABEL: name: load_16xs16
452 ; CHECK: liveins: $x0
454 ; CHECK-NEXT: %ptr:_(p0) = COPY $x0
455 ; CHECK-NEXT: [[LOAD:%[0-9]+]]:_(<8 x s16>) = G_LOAD %ptr(p0) :: (load (<8 x s16>), align 32)
456 ; CHECK-NEXT: [[C:%[0-9]+]]:_(s64) = G_CONSTANT i64 16
457 ; CHECK-NEXT: [[PTR_ADD:%[0-9]+]]:_(p0) = G_PTR_ADD %ptr, [[C]](s64)
458 ; CHECK-NEXT: [[LOAD1:%[0-9]+]]:_(<8 x s16>) = G_LOAD [[PTR_ADD]](p0) :: (load (<8 x s16>) from unknown-address + 16)
459 ; CHECK-NEXT: G_STORE [[LOAD]](<8 x s16>), %ptr(p0) :: (store (<8 x s16>), align 32)
460 ; CHECK-NEXT: [[PTR_ADD1:%[0-9]+]]:_(p0) = G_PTR_ADD %ptr, [[C]](s64)
461 ; CHECK-NEXT: G_STORE [[LOAD1]](<8 x s16>), [[PTR_ADD1]](p0) :: (store (<8 x s16>) into unknown-address + 16)
462 ; CHECK-NEXT: RET_ReallyLR
463 %ptr:_(p0) = COPY $x0
464 %val:_(<16 x s16>) = G_LOAD %ptr(p0) :: (load (<16 x s16>))
465 G_STORE %val(<16 x s16>), %ptr(p0) :: (store (<16 x s16>))
471 tracksRegLiveness: true
472 machineFunctionInfo: {}
476 ; CHECK-LABEL: name: load_8xs32
477 ; CHECK: liveins: $x0
479 ; CHECK-NEXT: %ptr:_(p0) = COPY $x0
480 ; CHECK-NEXT: [[LOAD:%[0-9]+]]:_(<4 x s32>) = G_LOAD %ptr(p0) :: (load (<4 x s32>), align 32)
481 ; CHECK-NEXT: [[C:%[0-9]+]]:_(s64) = G_CONSTANT i64 16
482 ; CHECK-NEXT: [[PTR_ADD:%[0-9]+]]:_(p0) = G_PTR_ADD %ptr, [[C]](s64)
483 ; CHECK-NEXT: [[LOAD1:%[0-9]+]]:_(<4 x s32>) = G_LOAD [[PTR_ADD]](p0) :: (load (<4 x s32>) from unknown-address + 16)
484 ; CHECK-NEXT: G_STORE [[LOAD]](<4 x s32>), %ptr(p0) :: (store (<4 x s32>), align 32)
485 ; CHECK-NEXT: [[PTR_ADD1:%[0-9]+]]:_(p0) = G_PTR_ADD %ptr, [[C]](s64)
486 ; CHECK-NEXT: G_STORE [[LOAD1]](<4 x s32>), [[PTR_ADD1]](p0) :: (store (<4 x s32>) into unknown-address + 16)
487 ; CHECK-NEXT: RET_ReallyLR
488 %ptr:_(p0) = COPY $x0
489 %val:_(<8 x s32>) = G_LOAD %ptr(p0) :: (load (<8 x s32>))
490 G_STORE %val(<8 x s32>), %ptr(p0) :: (store (<8 x s32>))
496 tracksRegLiveness: true
497 machineFunctionInfo: {}
501 ; CHECK-LABEL: name: load_4xs64
502 ; CHECK: liveins: $x0
504 ; CHECK-NEXT: %ptr:_(p0) = COPY $x0
505 ; CHECK-NEXT: [[LOAD:%[0-9]+]]:_(<2 x s64>) = G_LOAD %ptr(p0) :: (load (<2 x s64>), align 32)
506 ; CHECK-NEXT: [[C:%[0-9]+]]:_(s64) = G_CONSTANT i64 16
507 ; CHECK-NEXT: [[PTR_ADD:%[0-9]+]]:_(p0) = G_PTR_ADD %ptr, [[C]](s64)
508 ; CHECK-NEXT: [[LOAD1:%[0-9]+]]:_(<2 x s64>) = G_LOAD [[PTR_ADD]](p0) :: (load (<2 x s64>) from unknown-address + 16)
509 ; CHECK-NEXT: G_STORE [[LOAD]](<2 x s64>), %ptr(p0) :: (store (<2 x s64>), align 32)
510 ; CHECK-NEXT: [[PTR_ADD1:%[0-9]+]]:_(p0) = G_PTR_ADD %ptr, [[C]](s64)
511 ; CHECK-NEXT: G_STORE [[LOAD1]](<2 x s64>), [[PTR_ADD1]](p0) :: (store (<2 x s64>) into unknown-address + 16)
512 ; CHECK-NEXT: RET_ReallyLR
513 %ptr:_(p0) = COPY $x0
514 %val:_(<4 x s64>) = G_LOAD %ptr(p0) :: (load (<4 x s64>))
515 G_STORE %val(<4 x s64>), %ptr(p0) :: (store (<4 x s64>))
519 name: test_trunc_store
524 ; CHECK-LABEL: name: test_trunc_store
525 ; CHECK: liveins: $x0, $w1
527 ; CHECK-NEXT: [[COPY:%[0-9]+]]:_(p0) = COPY $x0
528 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:_(s32) = COPY $w1
529 ; CHECK-NEXT: %val64:_(s64) = COPY $x2
530 ; CHECK-NEXT: G_STORE [[COPY1]](s32), [[COPY]](p0) :: (store (s8))
531 ; CHECK-NEXT: G_STORE [[COPY1]](s32), [[COPY]](p0) :: (store (s16))
532 ; CHECK-NEXT: G_STORE %val64(s64), [[COPY]](p0) :: (store (s8))
533 ; CHECK-NEXT: G_STORE %val64(s64), [[COPY]](p0) :: (store (s16))
534 ; CHECK-NEXT: G_STORE %val64(s64), [[COPY]](p0) :: (store (s32))
537 %2:_(s8) = G_TRUNC %1(s32)
538 %val64:_(s64) = COPY $x2
539 G_STORE %1(s32), %0(p0) :: (store (s8))
540 G_STORE %1(s32), %0(p0) :: (store (s16))
541 G_STORE %val64(s64), %0(p0) :: (store (s8))
542 G_STORE %val64(s64), %0(p0) :: (store (s16))
543 G_STORE %val64(s64), %0(p0) :: (store (s32))
547 tracksRegLiveness: true
551 ; CHECK-LABEL: name: store_6xs64
552 ; CHECK: liveins: $x0
554 ; CHECK-NEXT: [[DEF:%[0-9]+]]:_(<2 x s64>) = G_IMPLICIT_DEF
555 ; CHECK-NEXT: %ptr:_(p0) = COPY $x0
556 ; CHECK-NEXT: G_STORE [[DEF]](<2 x s64>), %ptr(p0) :: (store (<2 x s64>))
557 ; CHECK-NEXT: [[C:%[0-9]+]]:_(s64) = G_CONSTANT i64 16
558 ; CHECK-NEXT: [[PTR_ADD:%[0-9]+]]:_(p0) = G_PTR_ADD %ptr, [[C]](s64)
559 ; CHECK-NEXT: G_STORE [[DEF]](<2 x s64>), [[PTR_ADD]](p0) :: (store (<2 x s64>) into unknown-address + 16)
560 ; CHECK-NEXT: [[C1:%[0-9]+]]:_(s64) = G_CONSTANT i64 32
561 ; CHECK-NEXT: [[PTR_ADD1:%[0-9]+]]:_(p0) = G_PTR_ADD %ptr, [[C1]](s64)
562 ; CHECK-NEXT: G_STORE [[DEF]](<2 x s64>), [[PTR_ADD1]](p0) :: (store (<2 x s64>) into unknown-address + 32)
563 ; CHECK-NEXT: RET_ReallyLR
564 %val:_(<6 x s64>) = G_IMPLICIT_DEF
565 %ptr:_(p0) = COPY $x0
566 G_STORE %val(<6 x s64>), %ptr(p0) :: (store (<6 x s64>), align 16)
571 tracksRegLiveness: true
576 ; CHECK-LABEL: name: store_2xi16
577 ; CHECK: liveins: $s0, $x0
579 ; CHECK-NEXT: [[COPY:%[0-9]+]]:_(p0) = COPY $x0
580 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:_(<2 x s16>) = COPY $s0
581 ; CHECK-NEXT: [[UV:%[0-9]+]]:_(s16), [[UV1:%[0-9]+]]:_(s16) = G_UNMERGE_VALUES [[COPY1]](<2 x s16>)
582 ; CHECK-NEXT: G_STORE [[UV]](s16), [[COPY]](p0) :: (store (s16), align 4)
583 ; CHECK-NEXT: [[C:%[0-9]+]]:_(s64) = G_CONSTANT i64 2
584 ; CHECK-NEXT: [[PTR_ADD:%[0-9]+]]:_(p0) = G_PTR_ADD [[COPY]], [[C]](s64)
585 ; CHECK-NEXT: G_STORE [[UV1]](s16), [[PTR_ADD]](p0) :: (store (s16) into unknown-address + 2)
586 ; CHECK-NEXT: RET_ReallyLR
588 %1:_(<2 x s16>) = COPY $s0
589 G_STORE %1(<2 x s16>), %0(p0) :: (store (<2 x s16>))
595 tracksRegLiveness: true
600 ; CHECK-LABEL: name: load_2xi16
601 ; CHECK: liveins: $s0, $x0
603 ; CHECK-NEXT: [[COPY:%[0-9]+]]:_(p0) = COPY $x0
604 ; CHECK-NEXT: [[LOAD:%[0-9]+]]:_(s16) = G_LOAD [[COPY]](p0) :: (load (s16), align 4)
605 ; CHECK-NEXT: [[C:%[0-9]+]]:_(s64) = G_CONSTANT i64 2
606 ; CHECK-NEXT: [[PTR_ADD:%[0-9]+]]:_(p0) = G_PTR_ADD [[COPY]], [[C]](s64)
607 ; CHECK-NEXT: [[LOAD1:%[0-9]+]]:_(s16) = G_LOAD [[PTR_ADD]](p0) :: (load (s16) from unknown-address + 2)
608 ; CHECK-NEXT: [[ANYEXT:%[0-9]+]]:_(s32) = G_ANYEXT [[LOAD]](s16)
609 ; CHECK-NEXT: [[ANYEXT1:%[0-9]+]]:_(s32) = G_ANYEXT [[LOAD1]](s16)
610 ; CHECK-NEXT: [[BUILD_VECTOR:%[0-9]+]]:_(<2 x s32>) = G_BUILD_VECTOR [[ANYEXT]](s32), [[ANYEXT1]](s32)
611 ; CHECK-NEXT: [[TRUNC:%[0-9]+]]:_(<2 x s16>) = G_TRUNC [[BUILD_VECTOR]](<2 x s32>)
612 ; CHECK-NEXT: $s0 = COPY [[TRUNC]](<2 x s16>)
613 ; CHECK-NEXT: RET_ReallyLR
615 %1(<2 x s16>) = G_LOAD %0(p0) :: (load (<2 x s16>))
616 $s0 = COPY %1:_(<2 x s16>)
621 name: load_store_s88_s88_mem_size
622 tracksRegLiveness: true
626 ; CHECK-LABEL: name: load_store_s88_s88_mem_size
627 ; CHECK: liveins: $x0
629 ; CHECK-NEXT: %ptr:_(p0) = COPY $x0
630 ; CHECK-NEXT: [[LOAD:%[0-9]+]]:_(s64) = G_LOAD %ptr(p0) :: (load (s64), align 16)
631 ; CHECK-NEXT: [[C:%[0-9]+]]:_(s64) = G_CONSTANT i64 0
632 ; CHECK-NEXT: [[C1:%[0-9]+]]:_(s64) = G_CONSTANT i64 8
633 ; CHECK-NEXT: [[PTR_ADD:%[0-9]+]]:_(p0) = G_PTR_ADD %ptr, [[C1]](s64)
634 ; CHECK-NEXT: [[ZEXTLOAD:%[0-9]+]]:_(s64) = G_ZEXTLOAD [[PTR_ADD]](p0) :: (load (s16) from unknown-address + 8, align 8)
635 ; CHECK-NEXT: [[C2:%[0-9]+]]:_(s64) = G_CONSTANT i64 2
636 ; CHECK-NEXT: [[PTR_ADD1:%[0-9]+]]:_(p0) = G_PTR_ADD [[PTR_ADD]], [[C2]](s64)
637 ; CHECK-NEXT: [[LOAD1:%[0-9]+]]:_(s32) = G_LOAD [[PTR_ADD1]](p0) :: (load (s8) from unknown-address + 10, align 2)
638 ; CHECK-NEXT: [[DEF:%[0-9]+]]:_(s32) = G_IMPLICIT_DEF
639 ; CHECK-NEXT: [[MV:%[0-9]+]]:_(s64) = G_MERGE_VALUES [[LOAD1]](s32), [[DEF]](s32)
640 ; CHECK-NEXT: [[C3:%[0-9]+]]:_(s64) = G_CONSTANT i64 16
641 ; CHECK-NEXT: [[SHL:%[0-9]+]]:_(s64) = G_SHL [[MV]], [[C3]](s64)
642 ; CHECK-NEXT: [[OR:%[0-9]+]]:_(s64) = G_OR [[SHL]], [[ZEXTLOAD]]
643 ; CHECK-NEXT: [[OR1:%[0-9]+]]:_(s64) = G_OR [[C]], [[LOAD]]
644 ; CHECK-NEXT: [[OR2:%[0-9]+]]:_(s64) = G_OR [[OR]], [[C]]
645 ; CHECK-NEXT: [[COPY:%[0-9]+]]:_(s64) = COPY [[OR1]](s64)
646 ; CHECK-NEXT: [[TRUNC:%[0-9]+]]:_(s32) = G_TRUNC [[OR2]](s64)
647 ; CHECK-NEXT: G_STORE [[COPY]](s64), %ptr(p0) :: (store (s64), align 16)
648 ; CHECK-NEXT: [[PTR_ADD2:%[0-9]+]]:_(p0) = G_PTR_ADD %ptr, [[C1]](s64)
649 ; CHECK-NEXT: [[LSHR:%[0-9]+]]:_(s32) = G_LSHR [[TRUNC]], [[C3]](s64)
650 ; CHECK-NEXT: [[PTR_ADD3:%[0-9]+]]:_(p0) = G_PTR_ADD [[PTR_ADD2]], [[C2]](s64)
651 ; CHECK-NEXT: G_STORE [[TRUNC]](s32), [[PTR_ADD2]](p0) :: (store (s16) into unknown-address + 8, align 8)
652 ; CHECK-NEXT: G_STORE [[LSHR]](s32), [[PTR_ADD3]](p0) :: (store (s8) into unknown-address + 10, align 2)
653 ; CHECK-NEXT: RET_ReallyLR
654 %ptr:_(p0) = COPY $x0
655 %load:_(s88) = G_LOAD %ptr(p0) :: (load (s88))
656 G_STORE %load(s88), %ptr(p0) :: (store (s88))
660 name: load_store_s88_s64_mem_size
661 tracksRegLiveness: true
665 ; CHECK-LABEL: name: load_store_s88_s64_mem_size
666 ; CHECK: liveins: $x0
668 ; CHECK-NEXT: %ptr:_(p0) = COPY $x0
669 ; CHECK-NEXT: [[LOAD:%[0-9]+]]:_(s64) = G_LOAD %ptr(p0) :: (load (s64))
670 ; CHECK-NEXT: G_STORE [[LOAD]](s64), %ptr(p0) :: (store (s64))
671 ; CHECK-NEXT: RET_ReallyLR
672 %ptr:_(p0) = COPY $x0
673 %load:_(s88) = G_LOAD %ptr(p0) :: (load (s64))
674 G_STORE %load(s88), %ptr(p0) :: (store (s64))
680 tracksRegLiveness: true
681 machineFunctionInfo: {}
685 ; CHECK-LABEL: name: load_s1
686 ; CHECK: liveins: $x0
688 ; CHECK-NEXT: %ptr:_(p0) = COPY $x0
689 ; CHECK-NEXT: [[LOAD:%[0-9]+]]:_(s8) = G_LOAD %ptr(p0) :: (load (s8))
690 ; CHECK-NEXT: [[ASSERT_ZEXT:%[0-9]+]]:_(s8) = G_ASSERT_ZEXT [[LOAD]], 1
691 ; CHECK-NEXT: [[C:%[0-9]+]]:_(s64) = G_CONSTANT i64 1
692 ; CHECK-NEXT: [[ANYEXT:%[0-9]+]]:_(s64) = G_ANYEXT [[ASSERT_ZEXT]](s8)
693 ; CHECK-NEXT: %ext:_(s64) = G_AND [[ANYEXT]], [[C]]
694 ; CHECK-NEXT: $x0 = COPY %ext(s64)
695 ; CHECK-NEXT: RET_ReallyLR implicit $x0
696 %ptr:_(p0) = COPY $x0
697 %load:_(s1) = G_LOAD %ptr(p0) :: (load (s1))
698 %ext:_(s64) = G_ZEXT %load
700 RET_ReallyLR implicit $x0
703 name: load_store_6xp0
705 tracksRegLiveness: true
706 machineFunctionInfo: {}
710 ; CHECK-LABEL: name: load_store_6xp0
711 ; CHECK: liveins: $x0
713 ; CHECK-NEXT: %ptr:_(p0) = COPY $x0
714 ; CHECK-NEXT: [[LOAD:%[0-9]+]]:_(p0) = G_LOAD %ptr(p0) :: (load (p0), align 64)
715 ; CHECK-NEXT: [[C:%[0-9]+]]:_(s64) = G_CONSTANT i64 8
716 ; CHECK-NEXT: [[PTR_ADD:%[0-9]+]]:_(p0) = G_PTR_ADD %ptr, [[C]](s64)
717 ; CHECK-NEXT: [[LOAD1:%[0-9]+]]:_(p0) = G_LOAD [[PTR_ADD]](p0) :: (load (p0) from unknown-address + 8)
718 ; CHECK-NEXT: [[C1:%[0-9]+]]:_(s64) = G_CONSTANT i64 16
719 ; CHECK-NEXT: [[PTR_ADD1:%[0-9]+]]:_(p0) = G_PTR_ADD %ptr, [[C1]](s64)
720 ; CHECK-NEXT: [[LOAD2:%[0-9]+]]:_(p0) = G_LOAD [[PTR_ADD1]](p0) :: (load (p0) from unknown-address + 16, align 16)
721 ; CHECK-NEXT: [[C2:%[0-9]+]]:_(s64) = G_CONSTANT i64 24
722 ; CHECK-NEXT: [[PTR_ADD2:%[0-9]+]]:_(p0) = G_PTR_ADD %ptr, [[C2]](s64)
723 ; CHECK-NEXT: [[LOAD3:%[0-9]+]]:_(p0) = G_LOAD [[PTR_ADD2]](p0) :: (load (p0) from unknown-address + 24)
724 ; CHECK-NEXT: [[C3:%[0-9]+]]:_(s64) = G_CONSTANT i64 32
725 ; CHECK-NEXT: [[PTR_ADD3:%[0-9]+]]:_(p0) = G_PTR_ADD %ptr, [[C3]](s64)
726 ; CHECK-NEXT: [[LOAD4:%[0-9]+]]:_(p0) = G_LOAD [[PTR_ADD3]](p0) :: (load (p0) from unknown-address + 32, align 32)
727 ; CHECK-NEXT: [[C4:%[0-9]+]]:_(s64) = G_CONSTANT i64 40
728 ; CHECK-NEXT: [[PTR_ADD4:%[0-9]+]]:_(p0) = G_PTR_ADD %ptr, [[C4]](s64)
729 ; CHECK-NEXT: [[LOAD5:%[0-9]+]]:_(p0) = G_LOAD [[PTR_ADD4]](p0) :: (load (p0) from unknown-address + 40)
730 ; CHECK-NEXT: [[BUILD_VECTOR:%[0-9]+]]:_(<2 x p0>) = G_BUILD_VECTOR [[LOAD]](p0), [[LOAD1]](p0)
731 ; CHECK-NEXT: [[BUILD_VECTOR1:%[0-9]+]]:_(<2 x p0>) = G_BUILD_VECTOR [[LOAD2]](p0), [[LOAD3]](p0)
732 ; CHECK-NEXT: [[BUILD_VECTOR2:%[0-9]+]]:_(<2 x p0>) = G_BUILD_VECTOR [[LOAD4]](p0), [[LOAD5]](p0)
733 ; CHECK-NEXT: [[BITCAST:%[0-9]+]]:_(<2 x s64>) = G_BITCAST [[BUILD_VECTOR]](<2 x p0>)
734 ; CHECK-NEXT: G_STORE [[BITCAST]](<2 x s64>), %ptr(p0) :: (store (<2 x s64>), align 64)
735 ; CHECK-NEXT: [[PTR_ADD5:%[0-9]+]]:_(p0) = G_PTR_ADD %ptr, [[C1]](s64)
736 ; CHECK-NEXT: [[BITCAST1:%[0-9]+]]:_(<2 x s64>) = G_BITCAST [[BUILD_VECTOR1]](<2 x p0>)
737 ; CHECK-NEXT: G_STORE [[BITCAST1]](<2 x s64>), [[PTR_ADD5]](p0) :: (store (<2 x s64>) into unknown-address + 16)
738 ; CHECK-NEXT: [[PTR_ADD6:%[0-9]+]]:_(p0) = G_PTR_ADD %ptr, [[C3]](s64)
739 ; CHECK-NEXT: [[BITCAST2:%[0-9]+]]:_(<2 x s64>) = G_BITCAST [[BUILD_VECTOR2]](<2 x p0>)
740 ; CHECK-NEXT: G_STORE [[BITCAST2]](<2 x s64>), [[PTR_ADD6]](p0) :: (store (<2 x s64>) into unknown-address + 32, align 32)
741 ; CHECK-NEXT: RET_ReallyLR
742 %ptr:_(p0) = COPY $x0
743 %val:_(<6 x p0>) = G_LOAD %ptr(p0) :: (load (<6 x p0>))
744 G_STORE %val(<6 x p0>), %ptr(p0) :: (store (<6 x p0>))