1 # NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py
2 # RUN: llc -march=aarch64 -run-pass=legalizer %s -o - -verify-machineinstrs | FileCheck %s
6 tracksRegLiveness: true
11 ; CHECK-LABEL: name: load_store_test
12 ; CHECK: liveins: $x0, $x1
13 ; CHECK: [[COPY:%[0-9]+]]:_(p0) = COPY $x0
14 ; CHECK: [[COPY1:%[0-9]+]]:_(p0) = COPY $x1
15 ; CHECK: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 0
16 ; CHECK: [[ZEXTLOAD:%[0-9]+]]:_(s32) = G_ZEXTLOAD [[COPY]](p0) :: (load (s16), align 4)
17 ; CHECK: [[C1:%[0-9]+]]:_(s64) = G_CONSTANT i64 2
18 ; CHECK: [[PTR_ADD:%[0-9]+]]:_(p0) = G_PTR_ADD [[COPY]], [[C1]](s64)
19 ; CHECK: [[LOAD:%[0-9]+]]:_(s32) = G_LOAD [[PTR_ADD]](p0) :: (load (s8) from unknown-address + 2, align 2)
20 ; CHECK: [[C2:%[0-9]+]]:_(s64) = G_CONSTANT i64 16
21 ; CHECK: [[SHL:%[0-9]+]]:_(s32) = G_SHL [[LOAD]], [[C2]](s64)
22 ; CHECK: [[OR:%[0-9]+]]:_(s32) = G_OR [[SHL]], [[ZEXTLOAD]]
23 ; CHECK: [[COPY2:%[0-9]+]]:_(s32) = COPY [[OR]](s32)
24 ; CHECK: [[LSHR:%[0-9]+]]:_(s32) = G_LSHR [[COPY2]], [[C2]](s64)
25 ; CHECK: [[PTR_ADD1:%[0-9]+]]:_(p0) = G_PTR_ADD [[COPY1]], [[C1]](s64)
26 ; CHECK: G_STORE [[COPY2]](s32), [[COPY1]](p0) :: (store (s16), align 4)
27 ; CHECK: G_STORE [[LSHR]](s32), [[PTR_ADD1]](p0) :: (store (s8) into unknown-address + 2, align 2)
28 ; CHECK: $w0 = COPY [[C]](s32)
29 ; CHECK: RET_ReallyLR implicit $w0
32 %3:_(s32) = G_CONSTANT i32 0
33 %2:_(s24) = G_LOAD %0(p0) :: (load (s24), align 4)
34 G_STORE %2(s24), %1(p0) :: (store (s24), align 4)
36 RET_ReallyLR implicit $w0
42 tracksRegLiveness: true
49 ; CHECK-LABEL: name: store_i56
51 ; CHECK: [[COPY:%[0-9]+]]:_(p0) = COPY $x0
52 ; CHECK: [[C:%[0-9]+]]:_(s64) = G_CONSTANT i64 32
53 ; CHECK: [[COPY1:%[0-9]+]]:_(s64) = COPY [[C]](s64)
54 ; CHECK: [[C1:%[0-9]+]]:_(s64) = G_CONSTANT i64 32
55 ; CHECK: [[LSHR:%[0-9]+]]:_(s64) = G_LSHR [[COPY1]], [[C1]](s64)
56 ; CHECK: [[C2:%[0-9]+]]:_(s64) = G_CONSTANT i64 4
57 ; CHECK: [[PTR_ADD:%[0-9]+]]:_(p0) = G_PTR_ADD [[COPY]], [[C2]](s64)
58 ; CHECK: G_STORE [[COPY1]](s64), [[COPY]](p0) :: (store (s32), align 8)
59 ; CHECK: [[TRUNC:%[0-9]+]]:_(s32) = G_TRUNC [[LSHR]](s64)
60 ; CHECK: [[C3:%[0-9]+]]:_(s64) = G_CONSTANT i64 16
61 ; CHECK: [[LSHR1:%[0-9]+]]:_(s32) = G_LSHR [[TRUNC]], [[C3]](s64)
62 ; CHECK: [[C4:%[0-9]+]]:_(s64) = G_CONSTANT i64 2
63 ; CHECK: [[PTR_ADD1:%[0-9]+]]:_(p0) = G_PTR_ADD [[PTR_ADD]], [[C4]](s64)
64 ; CHECK: G_STORE [[TRUNC]](s32), [[PTR_ADD]](p0) :: (store (s16) into unknown-address + 4, align 4)
65 ; CHECK: G_STORE [[LSHR1]](s32), [[PTR_ADD1]](p0) :: (store (s8) into unknown-address + 6, align 2)
68 %1:_(s56) = G_CONSTANT i56 32
69 G_STORE %1(s56), %0(p0) :: (store (s56), align 8)