1 # NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py
2 # RUN: llc -mtriple=riscv32 -run-pass=legalizer %s -o - \
11 ; CHECK-LABEL: name: saddo_i8
12 ; CHECK: liveins: $x10, $x11
14 ; CHECK-NEXT: [[COPY:%[0-9]+]]:_(s32) = COPY $x10
15 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:_(s32) = COPY $x11
16 ; CHECK-NEXT: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 24
17 ; CHECK-NEXT: [[SHL:%[0-9]+]]:_(s32) = G_SHL [[COPY]], [[C]](s32)
18 ; CHECK-NEXT: [[ASHR:%[0-9]+]]:_(s32) = G_ASHR [[SHL]], [[C]](s32)
19 ; CHECK-NEXT: [[SHL1:%[0-9]+]]:_(s32) = G_SHL [[COPY1]], [[C]](s32)
20 ; CHECK-NEXT: [[ASHR1:%[0-9]+]]:_(s32) = G_ASHR [[SHL1]], [[C]](s32)
21 ; CHECK-NEXT: [[ADD:%[0-9]+]]:_(s32) = G_ADD [[ASHR]], [[ASHR1]]
22 ; CHECK-NEXT: [[SHL2:%[0-9]+]]:_(s32) = G_SHL [[ADD]], [[C]](s32)
23 ; CHECK-NEXT: [[ASHR2:%[0-9]+]]:_(s32) = G_ASHR [[SHL2]], [[C]](s32)
24 ; CHECK-NEXT: [[ICMP:%[0-9]+]]:_(s32) = G_ICMP intpred(ne), [[ADD]](s32), [[ASHR2]]
25 ; CHECK-NEXT: $x10 = COPY [[ADD]](s32)
26 ; CHECK-NEXT: $x11 = COPY [[ICMP]](s32)
27 ; CHECK-NEXT: PseudoRET implicit $x10, implicit $x11
29 %0:_(s8) = G_TRUNC %2(s32)
31 %1:_(s8) = G_TRUNC %3(s32)
32 %4:_(s8), %5:_(s1) = G_SADDO %0, %1
33 %6:_(s32) = G_ANYEXT %4(s8)
34 %7:_(s32) = G_ANYEXT %5(s1)
37 PseudoRET implicit $x10, implicit $x11
46 ; CHECK-LABEL: name: saddo_i16
47 ; CHECK: liveins: $x10, $x11
49 ; CHECK-NEXT: [[COPY:%[0-9]+]]:_(s32) = COPY $x10
50 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:_(s32) = COPY $x11
51 ; CHECK-NEXT: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 16
52 ; CHECK-NEXT: [[SHL:%[0-9]+]]:_(s32) = G_SHL [[COPY]], [[C]](s32)
53 ; CHECK-NEXT: [[ASHR:%[0-9]+]]:_(s32) = G_ASHR [[SHL]], [[C]](s32)
54 ; CHECK-NEXT: [[SHL1:%[0-9]+]]:_(s32) = G_SHL [[COPY1]], [[C]](s32)
55 ; CHECK-NEXT: [[ASHR1:%[0-9]+]]:_(s32) = G_ASHR [[SHL1]], [[C]](s32)
56 ; CHECK-NEXT: [[ADD:%[0-9]+]]:_(s32) = G_ADD [[ASHR]], [[ASHR1]]
57 ; CHECK-NEXT: [[SHL2:%[0-9]+]]:_(s32) = G_SHL [[ADD]], [[C]](s32)
58 ; CHECK-NEXT: [[ASHR2:%[0-9]+]]:_(s32) = G_ASHR [[SHL2]], [[C]](s32)
59 ; CHECK-NEXT: [[ICMP:%[0-9]+]]:_(s32) = G_ICMP intpred(ne), [[ADD]](s32), [[ASHR2]]
60 ; CHECK-NEXT: $x10 = COPY [[ADD]](s32)
61 ; CHECK-NEXT: $x11 = COPY [[ICMP]](s32)
62 ; CHECK-NEXT: PseudoRET implicit $x10, implicit $x11
64 %0:_(s16) = G_TRUNC %2(s32)
66 %1:_(s16) = G_TRUNC %3(s32)
67 %4:_(s16), %5:_(s1) = G_SADDO %0, %1
68 %6:_(s32) = G_ANYEXT %4(s16)
69 %7:_(s32) = G_ANYEXT %5(s1)
72 PseudoRET implicit $x10, implicit $x11
81 ; CHECK-LABEL: name: saddo_i32
82 ; CHECK: liveins: $x10, $x11
84 ; CHECK-NEXT: [[COPY:%[0-9]+]]:_(s32) = COPY $x10
85 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:_(s32) = COPY $x11
86 ; CHECK-NEXT: [[ADD:%[0-9]+]]:_(s32) = G_ADD [[COPY]], [[COPY1]]
87 ; CHECK-NEXT: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 0
88 ; CHECK-NEXT: [[ICMP:%[0-9]+]]:_(s32) = G_ICMP intpred(slt), [[ADD]](s32), [[COPY]]
89 ; CHECK-NEXT: [[ICMP1:%[0-9]+]]:_(s32) = G_ICMP intpred(slt), [[COPY1]](s32), [[C]]
90 ; CHECK-NEXT: [[XOR:%[0-9]+]]:_(s32) = G_XOR [[ICMP1]], [[ICMP]]
91 ; CHECK-NEXT: [[COPY2:%[0-9]+]]:_(s32) = COPY [[ADD]](s32)
92 ; CHECK-NEXT: $x10 = COPY [[COPY2]](s32)
93 ; CHECK-NEXT: $x11 = COPY [[XOR]](s32)
94 ; CHECK-NEXT: PseudoRET implicit $x10, implicit $x11
97 %2:_(s32), %3:_(s1) = G_SADDO %0, %1
98 %4:_(s32) = G_ANYEXT %3(s1)
101 PseudoRET implicit $x10, implicit $x11
108 liveins: $x10, $x11, $x12, $x13
110 ; CHECK-LABEL: name: saddo_i64
111 ; CHECK: liveins: $x10, $x11, $x12, $x13
113 ; CHECK-NEXT: [[COPY:%[0-9]+]]:_(s32) = COPY $x10
114 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:_(s32) = COPY $x11
115 ; CHECK-NEXT: [[COPY2:%[0-9]+]]:_(s32) = COPY $x12
116 ; CHECK-NEXT: [[COPY3:%[0-9]+]]:_(s32) = COPY $x13
117 ; CHECK-NEXT: [[ADD:%[0-9]+]]:_(s32) = G_ADD [[COPY]], [[COPY2]]
118 ; CHECK-NEXT: [[ICMP:%[0-9]+]]:_(s32) = G_ICMP intpred(ult), [[ADD]](s32), [[COPY2]]
119 ; CHECK-NEXT: [[COPY4:%[0-9]+]]:_(s32) = COPY [[ADD]](s32)
120 ; CHECK-NEXT: [[ADD1:%[0-9]+]]:_(s32) = G_ADD [[COPY1]], [[COPY3]]
121 ; CHECK-NEXT: [[ADD2:%[0-9]+]]:_(s32) = G_ADD [[ADD1]], [[ICMP]]
122 ; CHECK-NEXT: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 0
123 ; CHECK-NEXT: [[COPY5:%[0-9]+]]:_(s32) = COPY [[ADD2]](s32)
124 ; CHECK-NEXT: [[ICMP1:%[0-9]+]]:_(s32) = G_ICMP intpred(ult), [[COPY4]](s32), [[COPY]]
125 ; CHECK-NEXT: [[ICMP2:%[0-9]+]]:_(s32) = G_ICMP intpred(slt), [[COPY5]](s32), [[COPY1]]
126 ; CHECK-NEXT: [[ICMP3:%[0-9]+]]:_(s32) = G_ICMP intpred(eq), [[COPY5]](s32), [[COPY1]]
127 ; CHECK-NEXT: [[SELECT:%[0-9]+]]:_(s32) = G_SELECT [[ICMP3]](s32), [[ICMP1]], [[ICMP2]]
128 ; CHECK-NEXT: [[ICMP4:%[0-9]+]]:_(s32) = G_ICMP intpred(ult), [[COPY2]](s32), [[C]]
129 ; CHECK-NEXT: [[ICMP5:%[0-9]+]]:_(s32) = G_ICMP intpred(slt), [[COPY3]](s32), [[C]]
130 ; CHECK-NEXT: [[ICMP6:%[0-9]+]]:_(s32) = G_ICMP intpred(eq), [[COPY3]](s32), [[C]]
131 ; CHECK-NEXT: [[SELECT1:%[0-9]+]]:_(s32) = G_SELECT [[ICMP6]](s32), [[ICMP4]], [[ICMP5]]
132 ; CHECK-NEXT: [[XOR:%[0-9]+]]:_(s32) = G_XOR [[SELECT1]], [[SELECT]]
133 ; CHECK-NEXT: $x10 = COPY [[COPY4]](s32)
134 ; CHECK-NEXT: $x11 = COPY [[COPY5]](s32)
135 ; CHECK-NEXT: $x12 = COPY [[XOR]](s32)
136 ; CHECK-NEXT: PseudoRET implicit $x10, implicit $x11, implicit $x12
137 %2:_(s32) = COPY $x10
138 %3:_(s32) = COPY $x11
139 %0:_(s64) = G_MERGE_VALUES %2(s32), %3(s32)
140 %4:_(s32) = COPY $x12
141 %5:_(s32) = COPY $x13
142 %1:_(s64) = G_MERGE_VALUES %4(s32), %5(s32)
143 %6:_(s64), %7:_(s1) = G_SADDO %0, %1
144 %8:_(s32), %9:_(s32) = G_UNMERGE_VALUES %6(s64)
145 %10:_(s32) = G_ANYEXT %7(s1)
149 PseudoRET implicit $x10, implicit $x11, implicit $x12
158 ; CHECK-LABEL: name: ssubo_i8
159 ; CHECK: liveins: $x10, $x11
161 ; CHECK-NEXT: [[COPY:%[0-9]+]]:_(s32) = COPY $x10
162 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:_(s32) = COPY $x11
163 ; CHECK-NEXT: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 24
164 ; CHECK-NEXT: [[SHL:%[0-9]+]]:_(s32) = G_SHL [[COPY]], [[C]](s32)
165 ; CHECK-NEXT: [[ASHR:%[0-9]+]]:_(s32) = G_ASHR [[SHL]], [[C]](s32)
166 ; CHECK-NEXT: [[SHL1:%[0-9]+]]:_(s32) = G_SHL [[COPY1]], [[C]](s32)
167 ; CHECK-NEXT: [[ASHR1:%[0-9]+]]:_(s32) = G_ASHR [[SHL1]], [[C]](s32)
168 ; CHECK-NEXT: [[SUB:%[0-9]+]]:_(s32) = G_SUB [[ASHR]], [[ASHR1]]
169 ; CHECK-NEXT: [[SHL2:%[0-9]+]]:_(s32) = G_SHL [[SUB]], [[C]](s32)
170 ; CHECK-NEXT: [[ASHR2:%[0-9]+]]:_(s32) = G_ASHR [[SHL2]], [[C]](s32)
171 ; CHECK-NEXT: [[ICMP:%[0-9]+]]:_(s32) = G_ICMP intpred(ne), [[SUB]](s32), [[ASHR2]]
172 ; CHECK-NEXT: $x10 = COPY [[SUB]](s32)
173 ; CHECK-NEXT: $x11 = COPY [[ICMP]](s32)
174 ; CHECK-NEXT: PseudoRET implicit $x10, implicit $x11
175 %2:_(s32) = COPY $x10
176 %0:_(s8) = G_TRUNC %2(s32)
177 %3:_(s32) = COPY $x11
178 %1:_(s8) = G_TRUNC %3(s32)
179 %4:_(s8), %5:_(s1) = G_SSUBO %0, %1
180 %6:_(s32) = G_ANYEXT %4(s8)
181 %7:_(s32) = G_ANYEXT %5(s1)
184 PseudoRET implicit $x10, implicit $x11
193 ; CHECK-LABEL: name: ssubo_i16
194 ; CHECK: liveins: $x10, $x11
196 ; CHECK-NEXT: [[COPY:%[0-9]+]]:_(s32) = COPY $x10
197 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:_(s32) = COPY $x11
198 ; CHECK-NEXT: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 16
199 ; CHECK-NEXT: [[SHL:%[0-9]+]]:_(s32) = G_SHL [[COPY]], [[C]](s32)
200 ; CHECK-NEXT: [[ASHR:%[0-9]+]]:_(s32) = G_ASHR [[SHL]], [[C]](s32)
201 ; CHECK-NEXT: [[SHL1:%[0-9]+]]:_(s32) = G_SHL [[COPY1]], [[C]](s32)
202 ; CHECK-NEXT: [[ASHR1:%[0-9]+]]:_(s32) = G_ASHR [[SHL1]], [[C]](s32)
203 ; CHECK-NEXT: [[SUB:%[0-9]+]]:_(s32) = G_SUB [[ASHR]], [[ASHR1]]
204 ; CHECK-NEXT: [[SHL2:%[0-9]+]]:_(s32) = G_SHL [[SUB]], [[C]](s32)
205 ; CHECK-NEXT: [[ASHR2:%[0-9]+]]:_(s32) = G_ASHR [[SHL2]], [[C]](s32)
206 ; CHECK-NEXT: [[ICMP:%[0-9]+]]:_(s32) = G_ICMP intpred(ne), [[SUB]](s32), [[ASHR2]]
207 ; CHECK-NEXT: $x10 = COPY [[SUB]](s32)
208 ; CHECK-NEXT: $x11 = COPY [[ICMP]](s32)
209 ; CHECK-NEXT: PseudoRET implicit $x10, implicit $x11
210 %2:_(s32) = COPY $x10
211 %0:_(s16) = G_TRUNC %2(s32)
212 %3:_(s32) = COPY $x11
213 %1:_(s16) = G_TRUNC %3(s32)
214 %4:_(s16), %5:_(s1) = G_SSUBO %0, %1
215 %6:_(s32) = G_ANYEXT %4(s16)
216 %7:_(s32) = G_ANYEXT %5(s1)
219 PseudoRET implicit $x10, implicit $x11
228 ; CHECK-LABEL: name: ssubo_i32
229 ; CHECK: liveins: $x10, $x11
231 ; CHECK-NEXT: [[COPY:%[0-9]+]]:_(s32) = COPY $x10
232 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:_(s32) = COPY $x11
233 ; CHECK-NEXT: [[SUB:%[0-9]+]]:_(s32) = G_SUB [[COPY]], [[COPY1]]
234 ; CHECK-NEXT: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 0
235 ; CHECK-NEXT: [[ICMP:%[0-9]+]]:_(s32) = G_ICMP intpred(slt), [[SUB]](s32), [[COPY]]
236 ; CHECK-NEXT: [[ICMP1:%[0-9]+]]:_(s32) = G_ICMP intpred(sgt), [[COPY1]](s32), [[C]]
237 ; CHECK-NEXT: [[XOR:%[0-9]+]]:_(s32) = G_XOR [[ICMP1]], [[ICMP]]
238 ; CHECK-NEXT: [[COPY2:%[0-9]+]]:_(s32) = COPY [[SUB]](s32)
239 ; CHECK-NEXT: $x10 = COPY [[COPY2]](s32)
240 ; CHECK-NEXT: $x11 = COPY [[XOR]](s32)
241 ; CHECK-NEXT: PseudoRET implicit $x10, implicit $x11
242 %0:_(s32) = COPY $x10
243 %1:_(s32) = COPY $x11
244 %2:_(s32), %3:_(s1) = G_SSUBO %0, %1
245 %4:_(s32) = G_ANYEXT %3(s1)
248 PseudoRET implicit $x10, implicit $x11
255 liveins: $x10, $x11, $x12, $x13
257 ; CHECK-LABEL: name: ssubo_i64
258 ; CHECK: liveins: $x10, $x11, $x12, $x13
260 ; CHECK-NEXT: [[COPY:%[0-9]+]]:_(s32) = COPY $x10
261 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:_(s32) = COPY $x11
262 ; CHECK-NEXT: [[COPY2:%[0-9]+]]:_(s32) = COPY $x12
263 ; CHECK-NEXT: [[COPY3:%[0-9]+]]:_(s32) = COPY $x13
264 ; CHECK-NEXT: [[SUB:%[0-9]+]]:_(s32) = G_SUB [[COPY]], [[COPY2]]
265 ; CHECK-NEXT: [[ICMP:%[0-9]+]]:_(s32) = G_ICMP intpred(ult), [[COPY]](s32), [[COPY2]]
266 ; CHECK-NEXT: [[SUB1:%[0-9]+]]:_(s32) = G_SUB [[COPY1]], [[COPY3]]
267 ; CHECK-NEXT: [[SUB2:%[0-9]+]]:_(s32) = G_SUB [[SUB1]], [[ICMP]]
268 ; CHECK-NEXT: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 0
269 ; CHECK-NEXT: [[ICMP1:%[0-9]+]]:_(s32) = G_ICMP intpred(ult), [[SUB]](s32), [[COPY]]
270 ; CHECK-NEXT: [[ICMP2:%[0-9]+]]:_(s32) = G_ICMP intpred(slt), [[SUB2]](s32), [[COPY1]]
271 ; CHECK-NEXT: [[ICMP3:%[0-9]+]]:_(s32) = G_ICMP intpred(eq), [[SUB2]](s32), [[COPY1]]
272 ; CHECK-NEXT: [[SELECT:%[0-9]+]]:_(s32) = G_SELECT [[ICMP3]](s32), [[ICMP1]], [[ICMP2]]
273 ; CHECK-NEXT: [[ICMP4:%[0-9]+]]:_(s32) = G_ICMP intpred(ugt), [[COPY2]](s32), [[C]]
274 ; CHECK-NEXT: [[ICMP5:%[0-9]+]]:_(s32) = G_ICMP intpred(sgt), [[COPY3]](s32), [[C]]
275 ; CHECK-NEXT: [[ICMP6:%[0-9]+]]:_(s32) = G_ICMP intpred(eq), [[COPY3]](s32), [[C]]
276 ; CHECK-NEXT: [[SELECT1:%[0-9]+]]:_(s32) = G_SELECT [[ICMP6]](s32), [[ICMP4]], [[ICMP5]]
277 ; CHECK-NEXT: [[XOR:%[0-9]+]]:_(s32) = G_XOR [[SELECT1]], [[SELECT]]
278 ; CHECK-NEXT: $x10 = COPY [[SUB]](s32)
279 ; CHECK-NEXT: $x11 = COPY [[SUB2]](s32)
280 ; CHECK-NEXT: $x12 = COPY [[XOR]](s32)
281 ; CHECK-NEXT: PseudoRET implicit $x10, implicit $x11, implicit $x12
282 %2:_(s32) = COPY $x10
283 %3:_(s32) = COPY $x11
284 %0:_(s64) = G_MERGE_VALUES %2(s32), %3(s32)
285 %4:_(s32) = COPY $x12
286 %5:_(s32) = COPY $x13
287 %1:_(s64) = G_MERGE_VALUES %4(s32), %5(s32)
288 %6:_(s64), %7:_(s1) = G_SSUBO %0, %1
289 %8:_(s32), %9:_(s32) = G_UNMERGE_VALUES %6(s64)
290 %10:_(s32) = G_ANYEXT %7(s1)
294 PseudoRET implicit $x10, implicit $x11, implicit $x12
303 ; CHECK-LABEL: name: uaddo_i8
304 ; CHECK: liveins: $x10, $x11
306 ; CHECK-NEXT: [[COPY:%[0-9]+]]:_(s32) = COPY $x10
307 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:_(s32) = COPY $x11
308 ; CHECK-NEXT: [[ADD:%[0-9]+]]:_(s32) = G_ADD [[COPY]], [[COPY1]]
309 ; CHECK-NEXT: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 255
310 ; CHECK-NEXT: [[AND:%[0-9]+]]:_(s32) = G_AND [[ADD]], [[C]]
311 ; CHECK-NEXT: [[AND1:%[0-9]+]]:_(s32) = G_AND [[COPY1]], [[C]]
312 ; CHECK-NEXT: [[ICMP:%[0-9]+]]:_(s32) = G_ICMP intpred(ult), [[AND]](s32), [[AND1]]
313 ; CHECK-NEXT: $x10 = COPY [[ADD]](s32)
314 ; CHECK-NEXT: $x11 = COPY [[ICMP]](s32)
315 ; CHECK-NEXT: PseudoRET implicit $x10, implicit $x11
316 %2:_(s32) = COPY $x10
317 %0:_(s8) = G_TRUNC %2(s32)
318 %3:_(s32) = COPY $x11
319 %1:_(s8) = G_TRUNC %3(s32)
320 %4:_(s8), %5:_(s1) = G_UADDO %0, %1
321 %6:_(s32) = G_ANYEXT %4(s8)
322 %7:_(s32) = G_ANYEXT %5(s1)
325 PseudoRET implicit $x10, implicit $x11
334 ; CHECK-LABEL: name: uaddo_i16
335 ; CHECK: liveins: $x10, $x11
337 ; CHECK-NEXT: [[COPY:%[0-9]+]]:_(s32) = COPY $x10
338 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:_(s32) = COPY $x11
339 ; CHECK-NEXT: [[ADD:%[0-9]+]]:_(s32) = G_ADD [[COPY]], [[COPY1]]
340 ; CHECK-NEXT: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 65535
341 ; CHECK-NEXT: [[AND:%[0-9]+]]:_(s32) = G_AND [[ADD]], [[C]]
342 ; CHECK-NEXT: [[AND1:%[0-9]+]]:_(s32) = G_AND [[COPY1]], [[C]]
343 ; CHECK-NEXT: [[ICMP:%[0-9]+]]:_(s32) = G_ICMP intpred(ult), [[AND]](s32), [[AND1]]
344 ; CHECK-NEXT: $x10 = COPY [[ADD]](s32)
345 ; CHECK-NEXT: $x11 = COPY [[ICMP]](s32)
346 ; CHECK-NEXT: PseudoRET implicit $x10, implicit $x11
347 %2:_(s32) = COPY $x10
348 %0:_(s16) = G_TRUNC %2(s32)
349 %3:_(s32) = COPY $x11
350 %1:_(s16) = G_TRUNC %3(s32)
351 %4:_(s16), %5:_(s1) = G_UADDO %0, %1
352 %6:_(s32) = G_ANYEXT %4(s16)
353 %7:_(s32) = G_ANYEXT %5(s1)
356 PseudoRET implicit $x10, implicit $x11
365 ; CHECK-LABEL: name: uaddo_i32
366 ; CHECK: liveins: $x10, $x11
368 ; CHECK-NEXT: [[COPY:%[0-9]+]]:_(s32) = COPY $x10
369 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:_(s32) = COPY $x11
370 ; CHECK-NEXT: [[ADD:%[0-9]+]]:_(s32) = G_ADD [[COPY]], [[COPY1]]
371 ; CHECK-NEXT: [[ICMP:%[0-9]+]]:_(s32) = G_ICMP intpred(ult), [[ADD]](s32), [[COPY1]]
372 ; CHECK-NEXT: [[COPY2:%[0-9]+]]:_(s32) = COPY [[ADD]](s32)
373 ; CHECK-NEXT: $x10 = COPY [[COPY2]](s32)
374 ; CHECK-NEXT: $x11 = COPY [[ICMP]](s32)
375 ; CHECK-NEXT: PseudoRET implicit $x10, implicit $x11
376 %0:_(s32) = COPY $x10
377 %1:_(s32) = COPY $x11
378 %2:_(s32), %3:_(s1) = G_UADDO %0, %1
379 %4:_(s32) = G_ANYEXT %3(s1)
382 PseudoRET implicit $x10, implicit $x11
389 liveins: $x10, $x11, $x12, $x13
391 ; CHECK-LABEL: name: uaddo_i64
392 ; CHECK: liveins: $x10, $x11, $x12, $x13
394 ; CHECK-NEXT: [[COPY:%[0-9]+]]:_(s32) = COPY $x10
395 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:_(s32) = COPY $x11
396 ; CHECK-NEXT: [[COPY2:%[0-9]+]]:_(s32) = COPY $x12
397 ; CHECK-NEXT: [[COPY3:%[0-9]+]]:_(s32) = COPY $x13
398 ; CHECK-NEXT: [[ADD:%[0-9]+]]:_(s32) = G_ADD [[COPY]], [[COPY2]]
399 ; CHECK-NEXT: [[ICMP:%[0-9]+]]:_(s32) = G_ICMP intpred(ult), [[ADD]](s32), [[COPY2]]
400 ; CHECK-NEXT: [[COPY4:%[0-9]+]]:_(s32) = COPY [[ADD]](s32)
401 ; CHECK-NEXT: [[ADD1:%[0-9]+]]:_(s32) = G_ADD [[COPY1]], [[COPY3]]
402 ; CHECK-NEXT: [[ADD2:%[0-9]+]]:_(s32) = G_ADD [[ADD1]], [[ICMP]]
403 ; CHECK-NEXT: [[COPY5:%[0-9]+]]:_(s32) = COPY [[ADD2]](s32)
404 ; CHECK-NEXT: [[ICMP1:%[0-9]+]]:_(s32) = G_ICMP intpred(ult), [[COPY4]](s32), [[COPY2]]
405 ; CHECK-NEXT: [[ICMP2:%[0-9]+]]:_(s32) = G_ICMP intpred(ult), [[COPY5]](s32), [[COPY3]]
406 ; CHECK-NEXT: [[ICMP3:%[0-9]+]]:_(s32) = G_ICMP intpred(eq), [[COPY5]](s32), [[COPY3]]
407 ; CHECK-NEXT: [[SELECT:%[0-9]+]]:_(s32) = G_SELECT [[ICMP3]](s32), [[ICMP1]], [[ICMP2]]
408 ; CHECK-NEXT: $x10 = COPY [[COPY4]](s32)
409 ; CHECK-NEXT: $x11 = COPY [[COPY5]](s32)
410 ; CHECK-NEXT: $x12 = COPY [[SELECT]](s32)
411 ; CHECK-NEXT: PseudoRET implicit $x10, implicit $x11, implicit $x12
412 %2:_(s32) = COPY $x10
413 %3:_(s32) = COPY $x11
414 %0:_(s64) = G_MERGE_VALUES %2(s32), %3(s32)
415 %4:_(s32) = COPY $x12
416 %5:_(s32) = COPY $x13
417 %1:_(s64) = G_MERGE_VALUES %4(s32), %5(s32)
418 %6:_(s64), %7:_(s1) = G_UADDO %0, %1
419 %8:_(s32), %9:_(s32) = G_UNMERGE_VALUES %6(s64)
420 %10:_(s32) = G_ANYEXT %7(s1)
424 PseudoRET implicit $x10, implicit $x11, implicit $x12
433 ; CHECK-LABEL: name: usubo_i8
434 ; CHECK: liveins: $x10, $x11
436 ; CHECK-NEXT: [[COPY:%[0-9]+]]:_(s32) = COPY $x10
437 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:_(s32) = COPY $x11
438 ; CHECK-NEXT: [[SUB:%[0-9]+]]:_(s32) = G_SUB [[COPY]], [[COPY1]]
439 ; CHECK-NEXT: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 255
440 ; CHECK-NEXT: [[AND:%[0-9]+]]:_(s32) = G_AND [[COPY]], [[C]]
441 ; CHECK-NEXT: [[AND1:%[0-9]+]]:_(s32) = G_AND [[COPY1]], [[C]]
442 ; CHECK-NEXT: [[ICMP:%[0-9]+]]:_(s32) = G_ICMP intpred(ult), [[AND]](s32), [[AND1]]
443 ; CHECK-NEXT: $x10 = COPY [[SUB]](s32)
444 ; CHECK-NEXT: $x11 = COPY [[ICMP]](s32)
445 ; CHECK-NEXT: PseudoRET implicit $x10, implicit $x11
446 %2:_(s32) = COPY $x10
447 %0:_(s8) = G_TRUNC %2(s32)
448 %3:_(s32) = COPY $x11
449 %1:_(s8) = G_TRUNC %3(s32)
450 %4:_(s8), %5:_(s1) = G_USUBO %0, %1
451 %6:_(s32) = G_ANYEXT %4(s8)
452 %7:_(s32) = G_ANYEXT %5(s1)
455 PseudoRET implicit $x10, implicit $x11
464 ; CHECK-LABEL: name: usubo_i16
465 ; CHECK: liveins: $x10, $x11
467 ; CHECK-NEXT: [[COPY:%[0-9]+]]:_(s32) = COPY $x10
468 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:_(s32) = COPY $x11
469 ; CHECK-NEXT: [[SUB:%[0-9]+]]:_(s32) = G_SUB [[COPY]], [[COPY1]]
470 ; CHECK-NEXT: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 65535
471 ; CHECK-NEXT: [[AND:%[0-9]+]]:_(s32) = G_AND [[COPY]], [[C]]
472 ; CHECK-NEXT: [[AND1:%[0-9]+]]:_(s32) = G_AND [[COPY1]], [[C]]
473 ; CHECK-NEXT: [[ICMP:%[0-9]+]]:_(s32) = G_ICMP intpred(ult), [[AND]](s32), [[AND1]]
474 ; CHECK-NEXT: $x10 = COPY [[SUB]](s32)
475 ; CHECK-NEXT: $x11 = COPY [[ICMP]](s32)
476 ; CHECK-NEXT: PseudoRET implicit $x10, implicit $x11
477 %2:_(s32) = COPY $x10
478 %0:_(s16) = G_TRUNC %2(s32)
479 %3:_(s32) = COPY $x11
480 %1:_(s16) = G_TRUNC %3(s32)
481 %4:_(s16), %5:_(s1) = G_USUBO %0, %1
482 %6:_(s32) = G_ANYEXT %4(s16)
483 %7:_(s32) = G_ANYEXT %5(s1)
486 PseudoRET implicit $x10, implicit $x11
495 ; CHECK-LABEL: name: usubo_i32
496 ; CHECK: liveins: $x10, $x11
498 ; CHECK-NEXT: [[COPY:%[0-9]+]]:_(s32) = COPY $x10
499 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:_(s32) = COPY $x11
500 ; CHECK-NEXT: [[SUB:%[0-9]+]]:_(s32) = G_SUB [[COPY]], [[COPY1]]
501 ; CHECK-NEXT: [[ICMP:%[0-9]+]]:_(s32) = G_ICMP intpred(ult), [[COPY]](s32), [[COPY1]]
502 ; CHECK-NEXT: $x10 = COPY [[SUB]](s32)
503 ; CHECK-NEXT: $x11 = COPY [[ICMP]](s32)
504 ; CHECK-NEXT: PseudoRET implicit $x10, implicit $x11
505 %0:_(s32) = COPY $x10
506 %1:_(s32) = COPY $x11
507 %2:_(s32), %3:_(s1) = G_USUBO %0, %1
508 %4:_(s32) = G_ANYEXT %3(s1)
511 PseudoRET implicit $x10, implicit $x11
518 liveins: $x10, $x11, $x12, $x13
520 ; CHECK-LABEL: name: usubo_i64
521 ; CHECK: liveins: $x10, $x11, $x12, $x13
523 ; CHECK-NEXT: [[COPY:%[0-9]+]]:_(s32) = COPY $x10
524 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:_(s32) = COPY $x11
525 ; CHECK-NEXT: [[COPY2:%[0-9]+]]:_(s32) = COPY $x12
526 ; CHECK-NEXT: [[COPY3:%[0-9]+]]:_(s32) = COPY $x13
527 ; CHECK-NEXT: [[SUB:%[0-9]+]]:_(s32) = G_SUB [[COPY]], [[COPY2]]
528 ; CHECK-NEXT: [[ICMP:%[0-9]+]]:_(s32) = G_ICMP intpred(ult), [[COPY]](s32), [[COPY2]]
529 ; CHECK-NEXT: [[SUB1:%[0-9]+]]:_(s32) = G_SUB [[COPY1]], [[COPY3]]
530 ; CHECK-NEXT: [[SUB2:%[0-9]+]]:_(s32) = G_SUB [[SUB1]], [[ICMP]]
531 ; CHECK-NEXT: [[ICMP1:%[0-9]+]]:_(s32) = G_ICMP intpred(ult), [[COPY]](s32), [[COPY2]]
532 ; CHECK-NEXT: [[ICMP2:%[0-9]+]]:_(s32) = G_ICMP intpred(ult), [[COPY1]](s32), [[COPY3]]
533 ; CHECK-NEXT: [[ICMP3:%[0-9]+]]:_(s32) = G_ICMP intpred(eq), [[COPY1]](s32), [[COPY3]]
534 ; CHECK-NEXT: [[SELECT:%[0-9]+]]:_(s32) = G_SELECT [[ICMP3]](s32), [[ICMP1]], [[ICMP2]]
535 ; CHECK-NEXT: $x10 = COPY [[SUB]](s32)
536 ; CHECK-NEXT: $x11 = COPY [[SUB2]](s32)
537 ; CHECK-NEXT: $x12 = COPY [[SELECT]](s32)
538 ; CHECK-NEXT: PseudoRET implicit $x10, implicit $x11, implicit $x12
539 %2:_(s32) = COPY $x10
540 %3:_(s32) = COPY $x11
541 %0:_(s64) = G_MERGE_VALUES %2(s32), %3(s32)
542 %4:_(s32) = COPY $x12
543 %5:_(s32) = COPY $x13
544 %1:_(s64) = G_MERGE_VALUES %4(s32), %5(s32)
545 %6:_(s64), %7:_(s1) = G_USUBO %0, %1
546 %8:_(s32), %9:_(s32) = G_UNMERGE_VALUES %6(s64)
547 %10:_(s32) = G_ANYEXT %7(s1)
551 PseudoRET implicit $x10, implicit $x11, implicit $x12