1 # NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py
2 # RUN: llc -O0 -mtriple=mipsel-linux-gnu -run-pass=legalizer -verify-machineinstrs %s -o - | FileCheck %s -check-prefixes=MIPS32
5 define void @load1_s8_to_load1_s32(i8* %px) {entry: ret void}
6 define void @load2_s16_to_load2_s32(i16* %px) {entry: ret void}
7 define void @load_store_i1(i1* %px, i1* %py) {entry: ret void}
8 define void @load_store_i8(i8* %px, i8* %py) {entry: ret void}
9 define void @load_store_i16(i16* %px, i16* %py) {entry: ret void}
10 define void @load_store_i32(i32* %px, i32* %py) {entry: ret void}
14 name: load1_s8_to_load1_s32
16 tracksRegLiveness: true
21 ; MIPS32-LABEL: name: load1_s8_to_load1_s32
22 ; MIPS32: liveins: $a0
23 ; MIPS32: [[COPY:%[0-9]+]]:_(p0) = COPY $a0
24 ; MIPS32: [[LOAD:%[0-9]+]]:_(s32) = G_LOAD [[COPY]](p0) :: (load (s8) from %ir.px)
25 ; MIPS32: $v0 = COPY [[LOAD]](s32)
26 ; MIPS32: RetRA implicit $v0
28 %2:_(s32) = G_LOAD %0(p0) :: (load (s8) from %ir.px)
34 name: load2_s16_to_load2_s32
36 tracksRegLiveness: true
41 ; MIPS32-LABEL: name: load2_s16_to_load2_s32
42 ; MIPS32: liveins: $a0
43 ; MIPS32: [[COPY:%[0-9]+]]:_(p0) = COPY $a0
44 ; MIPS32: [[LOAD:%[0-9]+]]:_(s32) = G_LOAD [[COPY]](p0) :: (load (s16) from %ir.px)
45 ; MIPS32: $v0 = COPY [[LOAD]](s32)
46 ; MIPS32: RetRA implicit $v0
48 %2:_(s32) = G_LOAD %0(p0) :: (load (s16) from %ir.px)
56 tracksRegLiveness: true
61 ; MIPS32-LABEL: name: load_store_i1
62 ; MIPS32: liveins: $a0, $a1
63 ; MIPS32: [[COPY:%[0-9]+]]:_(p0) = COPY $a0
64 ; MIPS32: [[COPY1:%[0-9]+]]:_(p0) = COPY $a1
65 ; MIPS32: [[LOAD:%[0-9]+]]:_(s32) = G_LOAD [[COPY1]](p0) :: (load (s8) from %ir.py)
66 ; MIPS32: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 1
67 ; MIPS32: [[COPY2:%[0-9]+]]:_(s32) = COPY [[LOAD]](s32)
68 ; MIPS32: [[AND:%[0-9]+]]:_(s32) = G_AND [[COPY2]], [[C]]
69 ; MIPS32: [[AND1:%[0-9]+]]:_(s32) = G_AND [[AND]], [[C]]
70 ; MIPS32: G_STORE [[AND1]](s32), [[COPY]](p0) :: (store (s8) into %ir.px)
74 %2:_(s1) = G_LOAD %1(p0) :: (load (s1) from %ir.py)
75 G_STORE %2(s1), %0(p0) :: (store (s1) into %ir.px)
82 tracksRegLiveness: true
87 ; MIPS32-LABEL: name: load_store_i8
88 ; MIPS32: liveins: $a0, $a1
89 ; MIPS32: [[COPY:%[0-9]+]]:_(p0) = COPY $a0
90 ; MIPS32: [[COPY1:%[0-9]+]]:_(p0) = COPY $a1
91 ; MIPS32: [[LOAD:%[0-9]+]]:_(s32) = G_LOAD [[COPY1]](p0) :: (load (s8) from %ir.py)
92 ; MIPS32: [[COPY2:%[0-9]+]]:_(s32) = COPY [[LOAD]](s32)
93 ; MIPS32: G_STORE [[COPY2]](s32), [[COPY]](p0) :: (store (s8) into %ir.px)
97 %2:_(s8) = G_LOAD %1(p0) :: (load (s8) from %ir.py)
98 G_STORE %2(s8), %0(p0) :: (store (s8) into %ir.px)
105 tracksRegLiveness: true
110 ; MIPS32-LABEL: name: load_store_i16
111 ; MIPS32: liveins: $a0, $a1
112 ; MIPS32: [[COPY:%[0-9]+]]:_(p0) = COPY $a0
113 ; MIPS32: [[COPY1:%[0-9]+]]:_(p0) = COPY $a1
114 ; MIPS32: [[LOAD:%[0-9]+]]:_(s32) = G_LOAD [[COPY1]](p0) :: (load (s16) from %ir.py)
115 ; MIPS32: [[COPY2:%[0-9]+]]:_(s32) = COPY [[LOAD]](s32)
116 ; MIPS32: G_STORE [[COPY2]](s32), [[COPY]](p0) :: (store (s16) into %ir.px)
120 %2:_(s16) = G_LOAD %1(p0) :: (load (s16) from %ir.py)
121 G_STORE %2(s16), %0(p0) :: (store (s16) into %ir.px)
128 tracksRegLiveness: true
133 ; MIPS32-LABEL: name: load_store_i32
134 ; MIPS32: liveins: $a0, $a1
135 ; MIPS32: [[COPY:%[0-9]+]]:_(p0) = COPY $a0
136 ; MIPS32: [[COPY1:%[0-9]+]]:_(p0) = COPY $a1
137 ; MIPS32: [[LOAD:%[0-9]+]]:_(s32) = G_LOAD [[COPY1]](p0) :: (load (s32) from %ir.py)
138 ; MIPS32: G_STORE [[LOAD]](s32), [[COPY]](p0) :: (store (s32) into %ir.px)
142 %2:_(s32) = G_LOAD %1(p0) :: (load (s32) from %ir.py)
143 G_STORE %2(s32), %0(p0) :: (store (s32) into %ir.px)