1 # NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py
2 # RUN: llc -mtriple=riscv64 -run-pass=legalizer %s -o - \
11 ; CHECK-LABEL: name: zextload_i8_i16
12 ; CHECK: liveins: $x10
14 ; CHECK-NEXT: [[COPY:%[0-9]+]]:_(p0) = COPY $x10
15 ; CHECK-NEXT: [[ZEXTLOAD:%[0-9]+]]:_(s64) = G_ZEXTLOAD [[COPY]](p0) :: (load (s8))
16 ; CHECK-NEXT: $x10 = COPY [[ZEXTLOAD]](s64)
17 ; CHECK-NEXT: PseudoRET implicit $x10
19 %2:_(s16) = G_ZEXTLOAD %0(p0) :: (load (s8))
20 %3:_(s64) = G_ANYEXT %2(s16)
22 PseudoRET implicit $x10
31 ; CHECK-LABEL: name: zextload_i8_i32
32 ; CHECK: liveins: $x10
34 ; CHECK-NEXT: [[COPY:%[0-9]+]]:_(p0) = COPY $x10
35 ; CHECK-NEXT: [[ZEXTLOAD:%[0-9]+]]:_(s64) = G_ZEXTLOAD [[COPY]](p0) :: (load (s8))
36 ; CHECK-NEXT: $x10 = COPY [[ZEXTLOAD]](s64)
37 ; CHECK-NEXT: PseudoRET implicit $x10
39 %2:_(s32) = G_ZEXTLOAD %0(p0) :: (load (s8))
40 %3:_(s64) = G_ANYEXT %2(s32)
42 PseudoRET implicit $x10
46 name: zextload_i16_i32
51 ; CHECK-LABEL: name: zextload_i16_i32
52 ; CHECK: liveins: $x10
54 ; CHECK-NEXT: [[COPY:%[0-9]+]]:_(p0) = COPY $x10
55 ; CHECK-NEXT: [[ZEXTLOAD:%[0-9]+]]:_(s64) = G_ZEXTLOAD [[COPY]](p0) :: (load (s16))
56 ; CHECK-NEXT: $x10 = COPY [[ZEXTLOAD]](s64)
57 ; CHECK-NEXT: PseudoRET implicit $x10
59 %2:_(s32) = G_ZEXTLOAD %0(p0) :: (load (s16))
60 %3:_(s64) = G_ANYEXT %2(s32)
62 PseudoRET implicit $x10
71 ; CHECK-LABEL: name: zextload_i8_i64
72 ; CHECK: liveins: $x10
74 ; CHECK-NEXT: [[COPY:%[0-9]+]]:_(p0) = COPY $x10
75 ; CHECK-NEXT: [[ZEXTLOAD:%[0-9]+]]:_(s64) = G_ZEXTLOAD [[COPY]](p0) :: (load (s8))
76 ; CHECK-NEXT: $x10 = COPY [[ZEXTLOAD]](s64)
77 ; CHECK-NEXT: PseudoRET implicit $x10
79 %2:_(s64) = G_ZEXTLOAD %0(p0) :: (load (s8))
81 PseudoRET implicit $x10
85 name: zextload_i16_i64
90 ; CHECK-LABEL: name: zextload_i16_i64
91 ; CHECK: liveins: $x10
93 ; CHECK-NEXT: [[COPY:%[0-9]+]]:_(p0) = COPY $x10
94 ; CHECK-NEXT: [[ZEXTLOAD:%[0-9]+]]:_(s64) = G_ZEXTLOAD [[COPY]](p0) :: (load (s16))
95 ; CHECK-NEXT: $x10 = COPY [[ZEXTLOAD]](s64)
96 ; CHECK-NEXT: PseudoRET implicit $x10
98 %2:_(s64) = G_ZEXTLOAD %0(p0) :: (load (s16))
100 PseudoRET implicit $x10
104 name: zextload_i32_i64
109 ; CHECK-LABEL: name: zextload_i32_i64
110 ; CHECK: liveins: $x10
112 ; CHECK-NEXT: [[COPY:%[0-9]+]]:_(p0) = COPY $x10
113 ; CHECK-NEXT: [[ZEXTLOAD:%[0-9]+]]:_(s64) = G_ZEXTLOAD [[COPY]](p0) :: (load (s32))
114 ; CHECK-NEXT: $x10 = COPY [[ZEXTLOAD]](s64)
115 ; CHECK-NEXT: PseudoRET implicit $x10
117 %2:_(s64) = G_ZEXTLOAD %0(p0) :: (load (s32))
119 PseudoRET implicit $x10
123 name: zextload_i8_i48
128 ; CHECK-LABEL: name: zextload_i8_i48
129 ; CHECK: liveins: $x10
131 ; CHECK-NEXT: [[COPY:%[0-9]+]]:_(p0) = COPY $x10
132 ; CHECK-NEXT: [[ZEXTLOAD:%[0-9]+]]:_(s64) = G_ZEXTLOAD [[COPY]](p0) :: (load (s8))
133 ; CHECK-NEXT: $x10 = COPY [[ZEXTLOAD]](s64)
134 ; CHECK-NEXT: PseudoRET implicit $x10
136 %2:_(s48) = G_ZEXTLOAD %0(p0) :: (load (s8))
137 %3:_(s64) = G_ANYEXT %2(s48)
139 PseudoRET implicit $x10
143 name: sextload_i8_i16
148 ; CHECK-LABEL: name: sextload_i8_i16
149 ; CHECK: liveins: $x10
151 ; CHECK-NEXT: [[COPY:%[0-9]+]]:_(p0) = COPY $x10
152 ; CHECK-NEXT: [[SEXTLOAD:%[0-9]+]]:_(s64) = G_SEXTLOAD [[COPY]](p0) :: (load (s8))
153 ; CHECK-NEXT: $x10 = COPY [[SEXTLOAD]](s64)
154 ; CHECK-NEXT: PseudoRET implicit $x10
156 %2:_(s16) = G_SEXTLOAD %0(p0) :: (load (s8))
157 %3:_(s64) = G_ANYEXT %2(s16)
159 PseudoRET implicit $x10
163 name: sextload_i8_i32
168 ; CHECK-LABEL: name: sextload_i8_i32
169 ; CHECK: liveins: $x10
171 ; CHECK-NEXT: [[COPY:%[0-9]+]]:_(p0) = COPY $x10
172 ; CHECK-NEXT: [[SEXTLOAD:%[0-9]+]]:_(s64) = G_SEXTLOAD [[COPY]](p0) :: (load (s8))
173 ; CHECK-NEXT: $x10 = COPY [[SEXTLOAD]](s64)
174 ; CHECK-NEXT: PseudoRET implicit $x10
176 %2:_(s32) = G_SEXTLOAD %0(p0) :: (load (s8))
177 %3:_(s64) = G_ANYEXT %2(s32)
179 PseudoRET implicit $x10
183 name: sextload_i16_i32
188 ; CHECK-LABEL: name: sextload_i16_i32
189 ; CHECK: liveins: $x10
191 ; CHECK-NEXT: [[COPY:%[0-9]+]]:_(p0) = COPY $x10
192 ; CHECK-NEXT: [[SEXTLOAD:%[0-9]+]]:_(s64) = G_SEXTLOAD [[COPY]](p0) :: (load (s16))
193 ; CHECK-NEXT: $x10 = COPY [[SEXTLOAD]](s64)
194 ; CHECK-NEXT: PseudoRET implicit $x10
196 %2:_(s32) = G_SEXTLOAD %0(p0) :: (load (s16))
197 %3:_(s64) = G_ANYEXT %2(s32)
199 PseudoRET implicit $x10
203 name: sextload_i8_i64
208 ; CHECK-LABEL: name: sextload_i8_i64
209 ; CHECK: liveins: $x10
211 ; CHECK-NEXT: [[COPY:%[0-9]+]]:_(p0) = COPY $x10
212 ; CHECK-NEXT: [[SEXTLOAD:%[0-9]+]]:_(s64) = G_SEXTLOAD [[COPY]](p0) :: (load (s8))
213 ; CHECK-NEXT: $x10 = COPY [[SEXTLOAD]](s64)
214 ; CHECK-NEXT: PseudoRET implicit $x10
216 %2:_(s64) = G_SEXTLOAD %0(p0) :: (load (s8))
218 PseudoRET implicit $x10
222 name: sextload_i16_i64
227 ; CHECK-LABEL: name: sextload_i16_i64
228 ; CHECK: liveins: $x10
230 ; CHECK-NEXT: [[COPY:%[0-9]+]]:_(p0) = COPY $x10
231 ; CHECK-NEXT: [[SEXTLOAD:%[0-9]+]]:_(s64) = G_SEXTLOAD [[COPY]](p0) :: (load (s16))
232 ; CHECK-NEXT: $x10 = COPY [[SEXTLOAD]](s64)
233 ; CHECK-NEXT: PseudoRET implicit $x10
235 %2:_(s64) = G_SEXTLOAD %0(p0) :: (load (s16))
237 PseudoRET implicit $x10
241 name: sextload_i32_i64
246 ; CHECK-LABEL: name: sextload_i32_i64
247 ; CHECK: liveins: $x10
249 ; CHECK-NEXT: [[COPY:%[0-9]+]]:_(p0) = COPY $x10
250 ; CHECK-NEXT: [[SEXTLOAD:%[0-9]+]]:_(s64) = G_SEXTLOAD [[COPY]](p0) :: (load (s32))
251 ; CHECK-NEXT: $x10 = COPY [[SEXTLOAD]](s64)
252 ; CHECK-NEXT: PseudoRET implicit $x10
254 %2:_(s64) = G_SEXTLOAD %0(p0) :: (load (s32))
256 PseudoRET implicit $x10
260 name: sextload_i8_i48
266 ; CHECK-LABEL: name: sextload_i8_i48
267 ; CHECK: liveins: $x10
269 ; CHECK-NEXT: [[COPY:%[0-9]+]]:_(p0) = COPY $x10
270 ; CHECK-NEXT: [[SEXTLOAD:%[0-9]+]]:_(s64) = G_SEXTLOAD [[COPY]](p0) :: (load (s8))
271 ; CHECK-NEXT: $x10 = COPY [[SEXTLOAD]](s64)
272 ; CHECK-NEXT: PseudoRET implicit $x10
274 %2:_(s48) = G_SEXTLOAD %0(p0) :: (load (s8))
275 %3:_(s64) = G_ANYEXT %2(s48)
277 PseudoRET implicit $x10