1 # NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py
2 # RUN: llc -mtriple=riscv32 -run-pass=legalizer %s -o - \
8 ; CHECK-LABEL: name: cmp_sgt_i7
9 ; CHECK: [[COPY:%[0-9]+]]:_(s32) = COPY $x10
10 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:_(s32) = COPY $x11
11 ; CHECK-NEXT: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 25
12 ; CHECK-NEXT: [[SHL:%[0-9]+]]:_(s32) = G_SHL [[COPY]], [[C]](s32)
13 ; CHECK-NEXT: [[ASHR:%[0-9]+]]:_(s32) = G_ASHR [[SHL]], [[C]](s32)
14 ; CHECK-NEXT: [[SHL1:%[0-9]+]]:_(s32) = G_SHL [[COPY1]], [[C]](s32)
15 ; CHECK-NEXT: [[ASHR1:%[0-9]+]]:_(s32) = G_ASHR [[SHL1]], [[C]](s32)
16 ; CHECK-NEXT: [[ICMP:%[0-9]+]]:_(s32) = G_ICMP intpred(sgt), [[ASHR]](s32), [[ASHR1]]
17 ; CHECK-NEXT: $x10 = COPY [[ICMP]](s32)
18 ; CHECK-NEXT: PseudoRET implicit $x10
21 %2:_(s7) = G_TRUNC %0(s32)
22 %3:_(s7) = G_TRUNC %1(s32)
23 %4:_(s1) = G_ICMP intpred(sgt), %2(s7), %3
24 %5:_(s32) = G_ANYEXT %4(s1)
26 PseudoRET implicit $x10
33 ; CHECK-LABEL: name: cmp_sgt_i8
34 ; CHECK: [[COPY:%[0-9]+]]:_(s32) = COPY $x10
35 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:_(s32) = COPY $x11
36 ; CHECK-NEXT: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 24
37 ; CHECK-NEXT: [[SHL:%[0-9]+]]:_(s32) = G_SHL [[COPY]], [[C]](s32)
38 ; CHECK-NEXT: [[ASHR:%[0-9]+]]:_(s32) = G_ASHR [[SHL]], [[C]](s32)
39 ; CHECK-NEXT: [[SHL1:%[0-9]+]]:_(s32) = G_SHL [[COPY1]], [[C]](s32)
40 ; CHECK-NEXT: [[ASHR1:%[0-9]+]]:_(s32) = G_ASHR [[SHL1]], [[C]](s32)
41 ; CHECK-NEXT: [[ICMP:%[0-9]+]]:_(s32) = G_ICMP intpred(sgt), [[ASHR]](s32), [[ASHR1]]
42 ; CHECK-NEXT: $x10 = COPY [[ICMP]](s32)
43 ; CHECK-NEXT: PseudoRET implicit $x10
46 %2:_(s8) = G_TRUNC %0(s32)
47 %3:_(s8) = G_TRUNC %1(s32)
48 %4:_(s1) = G_ICMP intpred(sgt), %2(s8), %3
49 %5:_(s32) = G_ANYEXT %4(s1)
51 PseudoRET implicit $x10
58 ; CHECK-LABEL: name: cmp_sgt_i16
59 ; CHECK: [[COPY:%[0-9]+]]:_(s32) = COPY $x10
60 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:_(s32) = COPY $x11
61 ; CHECK-NEXT: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 16
62 ; CHECK-NEXT: [[SHL:%[0-9]+]]:_(s32) = G_SHL [[COPY]], [[C]](s32)
63 ; CHECK-NEXT: [[ASHR:%[0-9]+]]:_(s32) = G_ASHR [[SHL]], [[C]](s32)
64 ; CHECK-NEXT: [[SHL1:%[0-9]+]]:_(s32) = G_SHL [[COPY1]], [[C]](s32)
65 ; CHECK-NEXT: [[ASHR1:%[0-9]+]]:_(s32) = G_ASHR [[SHL1]], [[C]](s32)
66 ; CHECK-NEXT: [[ICMP:%[0-9]+]]:_(s32) = G_ICMP intpred(sgt), [[ASHR]](s32), [[ASHR1]]
67 ; CHECK-NEXT: $x10 = COPY [[ICMP]](s32)
68 ; CHECK-NEXT: PseudoRET implicit $x10
71 %2:_(s16) = G_TRUNC %0(s32)
72 %3:_(s16) = G_TRUNC %1(s32)
73 %4:_(s1) = G_ICMP intpred(sgt), %2(s16), %3
74 %5:_(s32) = G_ANYEXT %4(s1)
76 PseudoRET implicit $x10
83 ; CHECK-LABEL: name: cmp_sgt_i32
84 ; CHECK: [[COPY:%[0-9]+]]:_(s32) = COPY $x10
85 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:_(s32) = COPY $x11
86 ; CHECK-NEXT: [[ICMP:%[0-9]+]]:_(s32) = G_ICMP intpred(sgt), [[COPY]](s32), [[COPY1]]
87 ; CHECK-NEXT: $x10 = COPY [[ICMP]](s32)
88 ; CHECK-NEXT: PseudoRET implicit $x10
91 %2:_(s1) = G_ICMP intpred(sgt), %0(s32), %1
92 %3:_(s32) = G_ANYEXT %2(s1)
94 PseudoRET implicit $x10
101 ; CHECK-LABEL: name: cmp_sgt_i48
102 ; CHECK: %xhi:_(s32) = COPY $x10
103 ; CHECK-NEXT: %xlo:_(s32) = COPY $x11
104 ; CHECK-NEXT: %yhi:_(s32) = COPY $x12
105 ; CHECK-NEXT: %ylo:_(s32) = COPY $x13
106 ; CHECK-NEXT: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 16
107 ; CHECK-NEXT: [[SHL:%[0-9]+]]:_(s32) = G_SHL %xlo, [[C]](s32)
108 ; CHECK-NEXT: [[ASHR:%[0-9]+]]:_(s32) = G_ASHR [[SHL]], [[C]](s32)
109 ; CHECK-NEXT: [[SHL1:%[0-9]+]]:_(s32) = G_SHL %ylo, [[C]](s32)
110 ; CHECK-NEXT: [[ASHR1:%[0-9]+]]:_(s32) = G_ASHR [[SHL1]], [[C]](s32)
111 ; CHECK-NEXT: [[ICMP:%[0-9]+]]:_(s32) = G_ICMP intpred(ugt), %xhi(s32), %yhi
112 ; CHECK-NEXT: [[ICMP1:%[0-9]+]]:_(s32) = G_ICMP intpred(sgt), [[ASHR]](s32), [[ASHR1]]
113 ; CHECK-NEXT: [[ICMP2:%[0-9]+]]:_(s32) = G_ICMP intpred(eq), [[ASHR]](s32), [[ASHR1]]
114 ; CHECK-NEXT: [[SELECT:%[0-9]+]]:_(s32) = G_SELECT [[ICMP2]](s32), [[ICMP]], [[ICMP1]]
115 ; CHECK-NEXT: $x10 = COPY [[SELECT]](s32)
116 ; CHECK-NEXT: PseudoRET implicit $x10
117 %xhi:_(s32) = COPY $x10
118 %xlo:_(s32) = COPY $x11
119 %yhi:_(s32) = COPY $x12
120 %ylo:_(s32) = COPY $x13
121 %x0:_(s64) = G_MERGE_VALUES %xhi(s32), %xlo(s32)
122 %y0:_(s64) = G_MERGE_VALUES %yhi(s32), %ylo(s32)
123 %x:_(s48) = G_TRUNC %x0(s64)
124 %y:_(s48) = G_TRUNC %y0(s64)
125 %z:_(s1) = G_ICMP intpred(sgt), %x(s48), %y
126 %z0:_(s32) = G_ANYEXT %z(s1)
128 PseudoRET implicit $x10
135 ; CHECK-LABEL: name: cmp_sgt_i64
136 ; CHECK: %xhi:_(s32) = COPY $x10
137 ; CHECK-NEXT: %xlo:_(s32) = COPY $x11
138 ; CHECK-NEXT: %yhi:_(s32) = COPY $x12
139 ; CHECK-NEXT: %ylo:_(s32) = COPY $x13
140 ; CHECK-NEXT: [[ICMP:%[0-9]+]]:_(s32) = G_ICMP intpred(ugt), %xhi(s32), %yhi
141 ; CHECK-NEXT: [[ICMP1:%[0-9]+]]:_(s32) = G_ICMP intpred(sgt), %xlo(s32), %ylo
142 ; CHECK-NEXT: [[ICMP2:%[0-9]+]]:_(s32) = G_ICMP intpred(eq), %xlo(s32), %ylo
143 ; CHECK-NEXT: [[SELECT:%[0-9]+]]:_(s32) = G_SELECT [[ICMP2]](s32), [[ICMP]], [[ICMP1]]
144 ; CHECK-NEXT: $x10 = COPY [[SELECT]](s32)
145 ; CHECK-NEXT: PseudoRET implicit $x10
146 %xhi:_(s32) = COPY $x10
147 %xlo:_(s32) = COPY $x11
148 %yhi:_(s32) = COPY $x12
149 %ylo:_(s32) = COPY $x13
150 %x:_(s64) = G_MERGE_VALUES %xhi(s32), %xlo(s32)
151 %y:_(s64) = G_MERGE_VALUES %yhi(s32), %ylo(s32)
152 %z:_(s1) = G_ICMP intpred(sgt), %x, %y
153 %z0:_(s32) = G_ANYEXT %z(s1)
155 PseudoRET implicit $x10
162 ; CHECK-LABEL: name: cmp_slt_i7
163 ; CHECK: [[COPY:%[0-9]+]]:_(s32) = COPY $x10
164 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:_(s32) = COPY $x11
165 ; CHECK-NEXT: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 25
166 ; CHECK-NEXT: [[SHL:%[0-9]+]]:_(s32) = G_SHL [[COPY]], [[C]](s32)
167 ; CHECK-NEXT: [[ASHR:%[0-9]+]]:_(s32) = G_ASHR [[SHL]], [[C]](s32)
168 ; CHECK-NEXT: [[SHL1:%[0-9]+]]:_(s32) = G_SHL [[COPY1]], [[C]](s32)
169 ; CHECK-NEXT: [[ASHR1:%[0-9]+]]:_(s32) = G_ASHR [[SHL1]], [[C]](s32)
170 ; CHECK-NEXT: [[ICMP:%[0-9]+]]:_(s32) = G_ICMP intpred(slt), [[ASHR]](s32), [[ASHR1]]
171 ; CHECK-NEXT: $x10 = COPY [[ICMP]](s32)
172 ; CHECK-NEXT: PseudoRET implicit $x10
173 %0:_(s32) = COPY $x10
174 %1:_(s32) = COPY $x11
175 %2:_(s7) = G_TRUNC %0(s32)
176 %3:_(s7) = G_TRUNC %1(s32)
177 %4:_(s1) = G_ICMP intpred(slt), %2(s7), %3
178 %5:_(s32) = G_ANYEXT %4(s1)
180 PseudoRET implicit $x10
187 ; CHECK-LABEL: name: cmp_slt_i8
188 ; CHECK: [[COPY:%[0-9]+]]:_(s32) = COPY $x10
189 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:_(s32) = COPY $x11
190 ; CHECK-NEXT: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 24
191 ; CHECK-NEXT: [[SHL:%[0-9]+]]:_(s32) = G_SHL [[COPY]], [[C]](s32)
192 ; CHECK-NEXT: [[ASHR:%[0-9]+]]:_(s32) = G_ASHR [[SHL]], [[C]](s32)
193 ; CHECK-NEXT: [[SHL1:%[0-9]+]]:_(s32) = G_SHL [[COPY1]], [[C]](s32)
194 ; CHECK-NEXT: [[ASHR1:%[0-9]+]]:_(s32) = G_ASHR [[SHL1]], [[C]](s32)
195 ; CHECK-NEXT: [[ICMP:%[0-9]+]]:_(s32) = G_ICMP intpred(slt), [[ASHR]](s32), [[ASHR1]]
196 ; CHECK-NEXT: $x10 = COPY [[ICMP]](s32)
197 ; CHECK-NEXT: PseudoRET implicit $x10
198 %0:_(s32) = COPY $x10
199 %1:_(s32) = COPY $x11
200 %2:_(s8) = G_TRUNC %0(s32)
201 %3:_(s8) = G_TRUNC %1(s32)
202 %4:_(s1) = G_ICMP intpred(slt), %2(s8), %3
203 %5:_(s32) = G_ANYEXT %4(s1)
205 PseudoRET implicit $x10
212 ; CHECK-LABEL: name: cmp_slt_i16
213 ; CHECK: [[COPY:%[0-9]+]]:_(s32) = COPY $x10
214 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:_(s32) = COPY $x11
215 ; CHECK-NEXT: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 16
216 ; CHECK-NEXT: [[SHL:%[0-9]+]]:_(s32) = G_SHL [[COPY]], [[C]](s32)
217 ; CHECK-NEXT: [[ASHR:%[0-9]+]]:_(s32) = G_ASHR [[SHL]], [[C]](s32)
218 ; CHECK-NEXT: [[SHL1:%[0-9]+]]:_(s32) = G_SHL [[COPY1]], [[C]](s32)
219 ; CHECK-NEXT: [[ASHR1:%[0-9]+]]:_(s32) = G_ASHR [[SHL1]], [[C]](s32)
220 ; CHECK-NEXT: [[ICMP:%[0-9]+]]:_(s32) = G_ICMP intpred(slt), [[ASHR]](s32), [[ASHR1]]
221 ; CHECK-NEXT: $x10 = COPY [[ICMP]](s32)
222 ; CHECK-NEXT: PseudoRET implicit $x10
223 %0:_(s32) = COPY $x10
224 %1:_(s32) = COPY $x11
225 %2:_(s16) = G_TRUNC %0(s32)
226 %3:_(s16) = G_TRUNC %1(s32)
227 %4:_(s1) = G_ICMP intpred(slt), %2(s16), %3
228 %5:_(s32) = G_ANYEXT %4(s1)
230 PseudoRET implicit $x10
237 ; CHECK-LABEL: name: cmp_slt_i32
238 ; CHECK: [[COPY:%[0-9]+]]:_(s32) = COPY $x10
239 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:_(s32) = COPY $x11
240 ; CHECK-NEXT: [[ICMP:%[0-9]+]]:_(s32) = G_ICMP intpred(slt), [[COPY]](s32), [[COPY1]]
241 ; CHECK-NEXT: $x10 = COPY [[ICMP]](s32)
242 ; CHECK-NEXT: PseudoRET implicit $x10
243 %0:_(s32) = COPY $x10
244 %1:_(s32) = COPY $x11
245 %2:_(s1) = G_ICMP intpred(slt), %0(s32), %1
246 %3:_(s32) = G_ANYEXT %2(s1)
248 PseudoRET implicit $x10
255 ; CHECK-LABEL: name: cmp_slt_i48
256 ; CHECK: %xhi:_(s32) = COPY $x10
257 ; CHECK-NEXT: %xlo:_(s32) = COPY $x11
258 ; CHECK-NEXT: %yhi:_(s32) = COPY $x12
259 ; CHECK-NEXT: %ylo:_(s32) = COPY $x13
260 ; CHECK-NEXT: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 16
261 ; CHECK-NEXT: [[SHL:%[0-9]+]]:_(s32) = G_SHL %xlo, [[C]](s32)
262 ; CHECK-NEXT: [[ASHR:%[0-9]+]]:_(s32) = G_ASHR [[SHL]], [[C]](s32)
263 ; CHECK-NEXT: [[SHL1:%[0-9]+]]:_(s32) = G_SHL %ylo, [[C]](s32)
264 ; CHECK-NEXT: [[ASHR1:%[0-9]+]]:_(s32) = G_ASHR [[SHL1]], [[C]](s32)
265 ; CHECK-NEXT: [[ICMP:%[0-9]+]]:_(s32) = G_ICMP intpred(ult), %xhi(s32), %yhi
266 ; CHECK-NEXT: [[ICMP1:%[0-9]+]]:_(s32) = G_ICMP intpred(slt), [[ASHR]](s32), [[ASHR1]]
267 ; CHECK-NEXT: [[ICMP2:%[0-9]+]]:_(s32) = G_ICMP intpred(eq), [[ASHR]](s32), [[ASHR1]]
268 ; CHECK-NEXT: [[SELECT:%[0-9]+]]:_(s32) = G_SELECT [[ICMP2]](s32), [[ICMP]], [[ICMP1]]
269 ; CHECK-NEXT: $x10 = COPY [[SELECT]](s32)
270 ; CHECK-NEXT: PseudoRET implicit $x10
271 %xhi:_(s32) = COPY $x10
272 %xlo:_(s32) = COPY $x11
273 %yhi:_(s32) = COPY $x12
274 %ylo:_(s32) = COPY $x13
275 %x0:_(s64) = G_MERGE_VALUES %xhi(s32), %xlo(s32)
276 %y0:_(s64) = G_MERGE_VALUES %yhi(s32), %ylo(s32)
277 %x:_(s48) = G_TRUNC %x0(s64)
278 %y:_(s48) = G_TRUNC %y0(s64)
279 %z:_(s1) = G_ICMP intpred(slt), %x(s48), %y
280 %z0:_(s32) = G_ANYEXT %z(s1)
282 PseudoRET implicit $x10
289 ; CHECK-LABEL: name: cmp_slt_i64
290 ; CHECK: %xhi:_(s32) = COPY $x10
291 ; CHECK-NEXT: %xlo:_(s32) = COPY $x11
292 ; CHECK-NEXT: %yhi:_(s32) = COPY $x12
293 ; CHECK-NEXT: %ylo:_(s32) = COPY $x13
294 ; CHECK-NEXT: [[ICMP:%[0-9]+]]:_(s32) = G_ICMP intpred(ult), %xhi(s32), %yhi
295 ; CHECK-NEXT: [[ICMP1:%[0-9]+]]:_(s32) = G_ICMP intpred(slt), %xlo(s32), %ylo
296 ; CHECK-NEXT: [[ICMP2:%[0-9]+]]:_(s32) = G_ICMP intpred(eq), %xlo(s32), %ylo
297 ; CHECK-NEXT: [[SELECT:%[0-9]+]]:_(s32) = G_SELECT [[ICMP2]](s32), [[ICMP]], [[ICMP1]]
298 ; CHECK-NEXT: $x10 = COPY [[SELECT]](s32)
299 ; CHECK-NEXT: PseudoRET implicit $x10
300 %xhi:_(s32) = COPY $x10
301 %xlo:_(s32) = COPY $x11
302 %yhi:_(s32) = COPY $x12
303 %ylo:_(s32) = COPY $x13
304 %x:_(s64) = G_MERGE_VALUES %xhi(s32), %xlo(s32)
305 %y:_(s64) = G_MERGE_VALUES %yhi(s32), %ylo(s32)
306 %z:_(s1) = G_ICMP intpred(slt), %x, %y
307 %z0:_(s32) = G_ANYEXT %z(s1)
309 PseudoRET implicit $x10
316 ; CHECK-LABEL: name: cmp_sge_i7
317 ; CHECK: [[COPY:%[0-9]+]]:_(s32) = COPY $x10
318 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:_(s32) = COPY $x11
319 ; CHECK-NEXT: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 25
320 ; CHECK-NEXT: [[SHL:%[0-9]+]]:_(s32) = G_SHL [[COPY]], [[C]](s32)
321 ; CHECK-NEXT: [[ASHR:%[0-9]+]]:_(s32) = G_ASHR [[SHL]], [[C]](s32)
322 ; CHECK-NEXT: [[SHL1:%[0-9]+]]:_(s32) = G_SHL [[COPY1]], [[C]](s32)
323 ; CHECK-NEXT: [[ASHR1:%[0-9]+]]:_(s32) = G_ASHR [[SHL1]], [[C]](s32)
324 ; CHECK-NEXT: [[ICMP:%[0-9]+]]:_(s32) = G_ICMP intpred(sge), [[ASHR]](s32), [[ASHR1]]
325 ; CHECK-NEXT: $x10 = COPY [[ICMP]](s32)
326 ; CHECK-NEXT: PseudoRET implicit $x10
327 %0:_(s32) = COPY $x10
328 %1:_(s32) = COPY $x11
329 %2:_(s7) = G_TRUNC %0(s32)
330 %3:_(s7) = G_TRUNC %1(s32)
331 %4:_(s1) = G_ICMP intpred(sge), %2(s7), %3
332 %5:_(s32) = G_ANYEXT %4(s1)
334 PseudoRET implicit $x10
341 ; CHECK-LABEL: name: cmp_sge_i8
342 ; CHECK: [[COPY:%[0-9]+]]:_(s32) = COPY $x10
343 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:_(s32) = COPY $x11
344 ; CHECK-NEXT: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 24
345 ; CHECK-NEXT: [[SHL:%[0-9]+]]:_(s32) = G_SHL [[COPY]], [[C]](s32)
346 ; CHECK-NEXT: [[ASHR:%[0-9]+]]:_(s32) = G_ASHR [[SHL]], [[C]](s32)
347 ; CHECK-NEXT: [[SHL1:%[0-9]+]]:_(s32) = G_SHL [[COPY1]], [[C]](s32)
348 ; CHECK-NEXT: [[ASHR1:%[0-9]+]]:_(s32) = G_ASHR [[SHL1]], [[C]](s32)
349 ; CHECK-NEXT: [[ICMP:%[0-9]+]]:_(s32) = G_ICMP intpred(sge), [[ASHR]](s32), [[ASHR1]]
350 ; CHECK-NEXT: $x10 = COPY [[ICMP]](s32)
351 ; CHECK-NEXT: PseudoRET implicit $x10
352 %0:_(s32) = COPY $x10
353 %1:_(s32) = COPY $x11
354 %2:_(s8) = G_TRUNC %0(s32)
355 %3:_(s8) = G_TRUNC %1(s32)
356 %4:_(s1) = G_ICMP intpred(sge), %2(s8), %3
357 %5:_(s32) = G_ANYEXT %4(s1)
359 PseudoRET implicit $x10
366 ; CHECK-LABEL: name: cmp_sge_i16
367 ; CHECK: [[COPY:%[0-9]+]]:_(s32) = COPY $x10
368 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:_(s32) = COPY $x11
369 ; CHECK-NEXT: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 16
370 ; CHECK-NEXT: [[SHL:%[0-9]+]]:_(s32) = G_SHL [[COPY]], [[C]](s32)
371 ; CHECK-NEXT: [[ASHR:%[0-9]+]]:_(s32) = G_ASHR [[SHL]], [[C]](s32)
372 ; CHECK-NEXT: [[SHL1:%[0-9]+]]:_(s32) = G_SHL [[COPY1]], [[C]](s32)
373 ; CHECK-NEXT: [[ASHR1:%[0-9]+]]:_(s32) = G_ASHR [[SHL1]], [[C]](s32)
374 ; CHECK-NEXT: [[ICMP:%[0-9]+]]:_(s32) = G_ICMP intpred(sge), [[ASHR]](s32), [[ASHR1]]
375 ; CHECK-NEXT: $x10 = COPY [[ICMP]](s32)
376 ; CHECK-NEXT: PseudoRET implicit $x10
377 %0:_(s32) = COPY $x10
378 %1:_(s32) = COPY $x11
379 %2:_(s16) = G_TRUNC %0(s32)
380 %3:_(s16) = G_TRUNC %1(s32)
381 %4:_(s1) = G_ICMP intpred(sge), %2(s16), %3
382 %5:_(s32) = G_ANYEXT %4(s1)
384 PseudoRET implicit $x10
391 ; CHECK-LABEL: name: cmp_sge_i32
392 ; CHECK: [[COPY:%[0-9]+]]:_(s32) = COPY $x10
393 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:_(s32) = COPY $x11
394 ; CHECK-NEXT: [[ICMP:%[0-9]+]]:_(s32) = G_ICMP intpred(sge), [[COPY]](s32), [[COPY1]]
395 ; CHECK-NEXT: $x10 = COPY [[ICMP]](s32)
396 ; CHECK-NEXT: PseudoRET implicit $x10
397 %0:_(s32) = COPY $x10
398 %1:_(s32) = COPY $x11
399 %2:_(s1) = G_ICMP intpred(sge), %0(s32), %1
400 %3:_(s32) = G_ANYEXT %2(s1)
402 PseudoRET implicit $x10
409 ; CHECK-LABEL: name: cmp_sge_i48
410 ; CHECK: %xhi:_(s32) = COPY $x10
411 ; CHECK-NEXT: %xlo:_(s32) = COPY $x11
412 ; CHECK-NEXT: %yhi:_(s32) = COPY $x12
413 ; CHECK-NEXT: %ylo:_(s32) = COPY $x13
414 ; CHECK-NEXT: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 16
415 ; CHECK-NEXT: [[SHL:%[0-9]+]]:_(s32) = G_SHL %xlo, [[C]](s32)
416 ; CHECK-NEXT: [[ASHR:%[0-9]+]]:_(s32) = G_ASHR [[SHL]], [[C]](s32)
417 ; CHECK-NEXT: [[SHL1:%[0-9]+]]:_(s32) = G_SHL %ylo, [[C]](s32)
418 ; CHECK-NEXT: [[ASHR1:%[0-9]+]]:_(s32) = G_ASHR [[SHL1]], [[C]](s32)
419 ; CHECK-NEXT: [[ICMP:%[0-9]+]]:_(s32) = G_ICMP intpred(uge), %xhi(s32), %yhi
420 ; CHECK-NEXT: [[ICMP1:%[0-9]+]]:_(s32) = G_ICMP intpred(sge), [[ASHR]](s32), [[ASHR1]]
421 ; CHECK-NEXT: [[ICMP2:%[0-9]+]]:_(s32) = G_ICMP intpred(eq), [[ASHR]](s32), [[ASHR1]]
422 ; CHECK-NEXT: [[SELECT:%[0-9]+]]:_(s32) = G_SELECT [[ICMP2]](s32), [[ICMP]], [[ICMP1]]
423 ; CHECK-NEXT: $x10 = COPY [[SELECT]](s32)
424 ; CHECK-NEXT: PseudoRET implicit $x10
425 %xhi:_(s32) = COPY $x10
426 %xlo:_(s32) = COPY $x11
427 %yhi:_(s32) = COPY $x12
428 %ylo:_(s32) = COPY $x13
429 %x0:_(s64) = G_MERGE_VALUES %xhi(s32), %xlo(s32)
430 %y0:_(s64) = G_MERGE_VALUES %yhi(s32), %ylo(s32)
431 %x:_(s48) = G_TRUNC %x0(s64)
432 %y:_(s48) = G_TRUNC %y0(s64)
433 %z:_(s1) = G_ICMP intpred(sge), %x(s48), %y
434 %z0:_(s32) = G_ANYEXT %z(s1)
436 PseudoRET implicit $x10
443 ; CHECK-LABEL: name: cmp_sge_i64
444 ; CHECK: %xhi:_(s32) = COPY $x10
445 ; CHECK-NEXT: %xlo:_(s32) = COPY $x11
446 ; CHECK-NEXT: %yhi:_(s32) = COPY $x12
447 ; CHECK-NEXT: %ylo:_(s32) = COPY $x13
448 ; CHECK-NEXT: [[ICMP:%[0-9]+]]:_(s32) = G_ICMP intpred(uge), %xhi(s32), %yhi
449 ; CHECK-NEXT: [[ICMP1:%[0-9]+]]:_(s32) = G_ICMP intpred(sge), %xlo(s32), %ylo
450 ; CHECK-NEXT: [[ICMP2:%[0-9]+]]:_(s32) = G_ICMP intpred(eq), %xlo(s32), %ylo
451 ; CHECK-NEXT: [[SELECT:%[0-9]+]]:_(s32) = G_SELECT [[ICMP2]](s32), [[ICMP]], [[ICMP1]]
452 ; CHECK-NEXT: $x10 = COPY [[SELECT]](s32)
453 ; CHECK-NEXT: PseudoRET implicit $x10
454 %xhi:_(s32) = COPY $x10
455 %xlo:_(s32) = COPY $x11
456 %yhi:_(s32) = COPY $x12
457 %ylo:_(s32) = COPY $x13
458 %x:_(s64) = G_MERGE_VALUES %xhi(s32), %xlo(s32)
459 %y:_(s64) = G_MERGE_VALUES %yhi(s32), %ylo(s32)
460 %z:_(s1) = G_ICMP intpred(sge), %x, %y
461 %z0:_(s32) = G_ANYEXT %z(s1)
463 PseudoRET implicit $x10
470 ; CHECK-LABEL: name: cmp_sle_i7
471 ; CHECK: [[COPY:%[0-9]+]]:_(s32) = COPY $x10
472 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:_(s32) = COPY $x11
473 ; CHECK-NEXT: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 25
474 ; CHECK-NEXT: [[SHL:%[0-9]+]]:_(s32) = G_SHL [[COPY]], [[C]](s32)
475 ; CHECK-NEXT: [[ASHR:%[0-9]+]]:_(s32) = G_ASHR [[SHL]], [[C]](s32)
476 ; CHECK-NEXT: [[SHL1:%[0-9]+]]:_(s32) = G_SHL [[COPY1]], [[C]](s32)
477 ; CHECK-NEXT: [[ASHR1:%[0-9]+]]:_(s32) = G_ASHR [[SHL1]], [[C]](s32)
478 ; CHECK-NEXT: [[ICMP:%[0-9]+]]:_(s32) = G_ICMP intpred(sle), [[ASHR]](s32), [[ASHR1]]
479 ; CHECK-NEXT: $x10 = COPY [[ICMP]](s32)
480 ; CHECK-NEXT: PseudoRET implicit $x10
481 %0:_(s32) = COPY $x10
482 %1:_(s32) = COPY $x11
483 %2:_(s7) = G_TRUNC %0(s32)
484 %3:_(s7) = G_TRUNC %1(s32)
485 %4:_(s1) = G_ICMP intpred(sle), %2(s7), %3
486 %5:_(s32) = G_ANYEXT %4(s1)
488 PseudoRET implicit $x10
495 ; CHECK-LABEL: name: cmp_sle_i8
496 ; CHECK: [[COPY:%[0-9]+]]:_(s32) = COPY $x10
497 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:_(s32) = COPY $x11
498 ; CHECK-NEXT: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 24
499 ; CHECK-NEXT: [[SHL:%[0-9]+]]:_(s32) = G_SHL [[COPY]], [[C]](s32)
500 ; CHECK-NEXT: [[ASHR:%[0-9]+]]:_(s32) = G_ASHR [[SHL]], [[C]](s32)
501 ; CHECK-NEXT: [[SHL1:%[0-9]+]]:_(s32) = G_SHL [[COPY1]], [[C]](s32)
502 ; CHECK-NEXT: [[ASHR1:%[0-9]+]]:_(s32) = G_ASHR [[SHL1]], [[C]](s32)
503 ; CHECK-NEXT: [[ICMP:%[0-9]+]]:_(s32) = G_ICMP intpred(sle), [[ASHR]](s32), [[ASHR1]]
504 ; CHECK-NEXT: $x10 = COPY [[ICMP]](s32)
505 ; CHECK-NEXT: PseudoRET implicit $x10
506 %0:_(s32) = COPY $x10
507 %1:_(s32) = COPY $x11
508 %2:_(s8) = G_TRUNC %0(s32)
509 %3:_(s8) = G_TRUNC %1(s32)
510 %4:_(s1) = G_ICMP intpred(sle), %2(s8), %3
511 %5:_(s32) = G_ANYEXT %4(s1)
513 PseudoRET implicit $x10
520 ; CHECK-LABEL: name: cmp_sle_i16
521 ; CHECK: [[COPY:%[0-9]+]]:_(s32) = COPY $x10
522 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:_(s32) = COPY $x11
523 ; CHECK-NEXT: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 16
524 ; CHECK-NEXT: [[SHL:%[0-9]+]]:_(s32) = G_SHL [[COPY]], [[C]](s32)
525 ; CHECK-NEXT: [[ASHR:%[0-9]+]]:_(s32) = G_ASHR [[SHL]], [[C]](s32)
526 ; CHECK-NEXT: [[SHL1:%[0-9]+]]:_(s32) = G_SHL [[COPY1]], [[C]](s32)
527 ; CHECK-NEXT: [[ASHR1:%[0-9]+]]:_(s32) = G_ASHR [[SHL1]], [[C]](s32)
528 ; CHECK-NEXT: [[ICMP:%[0-9]+]]:_(s32) = G_ICMP intpred(sle), [[ASHR]](s32), [[ASHR1]]
529 ; CHECK-NEXT: $x10 = COPY [[ICMP]](s32)
530 ; CHECK-NEXT: PseudoRET implicit $x10
531 %0:_(s32) = COPY $x10
532 %1:_(s32) = COPY $x11
533 %2:_(s16) = G_TRUNC %0(s32)
534 %3:_(s16) = G_TRUNC %1(s32)
535 %4:_(s1) = G_ICMP intpred(sle), %2(s16), %3
536 %5:_(s32) = G_ANYEXT %4(s1)
538 PseudoRET implicit $x10
545 ; CHECK-LABEL: name: cmp_sle_i32
546 ; CHECK: [[COPY:%[0-9]+]]:_(s32) = COPY $x10
547 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:_(s32) = COPY $x11
548 ; CHECK-NEXT: [[ICMP:%[0-9]+]]:_(s32) = G_ICMP intpred(sle), [[COPY]](s32), [[COPY1]]
549 ; CHECK-NEXT: $x10 = COPY [[ICMP]](s32)
550 ; CHECK-NEXT: PseudoRET implicit $x10
551 %0:_(s32) = COPY $x10
552 %1:_(s32) = COPY $x11
553 %2:_(s1) = G_ICMP intpred(sle), %0(s32), %1
554 %3:_(s32) = G_ANYEXT %2(s1)
556 PseudoRET implicit $x10
563 ; CHECK-LABEL: name: cmp_sle_i48
564 ; CHECK: %xhi:_(s32) = COPY $x10
565 ; CHECK-NEXT: %xlo:_(s32) = COPY $x11
566 ; CHECK-NEXT: %yhi:_(s32) = COPY $x12
567 ; CHECK-NEXT: %ylo:_(s32) = COPY $x13
568 ; CHECK-NEXT: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 16
569 ; CHECK-NEXT: [[SHL:%[0-9]+]]:_(s32) = G_SHL %xlo, [[C]](s32)
570 ; CHECK-NEXT: [[ASHR:%[0-9]+]]:_(s32) = G_ASHR [[SHL]], [[C]](s32)
571 ; CHECK-NEXT: [[SHL1:%[0-9]+]]:_(s32) = G_SHL %ylo, [[C]](s32)
572 ; CHECK-NEXT: [[ASHR1:%[0-9]+]]:_(s32) = G_ASHR [[SHL1]], [[C]](s32)
573 ; CHECK-NEXT: [[ICMP:%[0-9]+]]:_(s32) = G_ICMP intpred(ule), %xhi(s32), %yhi
574 ; CHECK-NEXT: [[ICMP1:%[0-9]+]]:_(s32) = G_ICMP intpred(sle), [[ASHR]](s32), [[ASHR1]]
575 ; CHECK-NEXT: [[ICMP2:%[0-9]+]]:_(s32) = G_ICMP intpred(eq), [[ASHR]](s32), [[ASHR1]]
576 ; CHECK-NEXT: [[SELECT:%[0-9]+]]:_(s32) = G_SELECT [[ICMP2]](s32), [[ICMP]], [[ICMP1]]
577 ; CHECK-NEXT: $x10 = COPY [[SELECT]](s32)
578 ; CHECK-NEXT: PseudoRET implicit $x10
579 %xhi:_(s32) = COPY $x10
580 %xlo:_(s32) = COPY $x11
581 %yhi:_(s32) = COPY $x12
582 %ylo:_(s32) = COPY $x13
583 %x0:_(s64) = G_MERGE_VALUES %xhi(s32), %xlo(s32)
584 %y0:_(s64) = G_MERGE_VALUES %yhi(s32), %ylo(s32)
585 %x:_(s48) = G_TRUNC %x0(s64)
586 %y:_(s48) = G_TRUNC %y0(s64)
587 %z:_(s1) = G_ICMP intpred(sle), %x(s48), %y
588 %z0:_(s32) = G_ANYEXT %z(s1)
590 PseudoRET implicit $x10
597 ; CHECK-LABEL: name: cmp_sle_i64
598 ; CHECK: %xhi:_(s32) = COPY $x10
599 ; CHECK-NEXT: %xlo:_(s32) = COPY $x11
600 ; CHECK-NEXT: %yhi:_(s32) = COPY $x12
601 ; CHECK-NEXT: %ylo:_(s32) = COPY $x13
602 ; CHECK-NEXT: [[ICMP:%[0-9]+]]:_(s32) = G_ICMP intpred(ule), %xhi(s32), %yhi
603 ; CHECK-NEXT: [[ICMP1:%[0-9]+]]:_(s32) = G_ICMP intpred(sle), %xlo(s32), %ylo
604 ; CHECK-NEXT: [[ICMP2:%[0-9]+]]:_(s32) = G_ICMP intpred(eq), %xlo(s32), %ylo
605 ; CHECK-NEXT: [[SELECT:%[0-9]+]]:_(s32) = G_SELECT [[ICMP2]](s32), [[ICMP]], [[ICMP1]]
606 ; CHECK-NEXT: $x10 = COPY [[SELECT]](s32)
607 ; CHECK-NEXT: PseudoRET implicit $x10
608 %xhi:_(s32) = COPY $x10
609 %xlo:_(s32) = COPY $x11
610 %yhi:_(s32) = COPY $x12
611 %ylo:_(s32) = COPY $x13
612 %x:_(s64) = G_MERGE_VALUES %xhi(s32), %xlo(s32)
613 %y:_(s64) = G_MERGE_VALUES %yhi(s32), %ylo(s32)
614 %z:_(s1) = G_ICMP intpred(sle), %x, %y
615 %z0:_(s32) = G_ANYEXT %z(s1)
617 PseudoRET implicit $x10
624 ; CHECK-LABEL: name: cmp_ugt_i7
625 ; CHECK: [[COPY:%[0-9]+]]:_(s32) = COPY $x10
626 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:_(s32) = COPY $x11
627 ; CHECK-NEXT: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 127
628 ; CHECK-NEXT: [[AND:%[0-9]+]]:_(s32) = G_AND [[COPY]], [[C]]
629 ; CHECK-NEXT: [[AND1:%[0-9]+]]:_(s32) = G_AND [[COPY1]], [[C]]
630 ; CHECK-NEXT: [[ICMP:%[0-9]+]]:_(s32) = G_ICMP intpred(ugt), [[AND]](s32), [[AND1]]
631 ; CHECK-NEXT: $x10 = COPY [[ICMP]](s32)
632 ; CHECK-NEXT: PseudoRET implicit $x10
633 %0:_(s32) = COPY $x10
634 %1:_(s32) = COPY $x11
635 %2:_(s7) = G_TRUNC %0(s32)
636 %3:_(s7) = G_TRUNC %1(s32)
637 %4:_(s1) = G_ICMP intpred(ugt), %2(s7), %3
638 %5:_(s32) = G_ANYEXT %4(s1)
640 PseudoRET implicit $x10
647 ; CHECK-LABEL: name: cmp_ugt_i8
648 ; CHECK: [[COPY:%[0-9]+]]:_(s32) = COPY $x10
649 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:_(s32) = COPY $x11
650 ; CHECK-NEXT: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 255
651 ; CHECK-NEXT: [[AND:%[0-9]+]]:_(s32) = G_AND [[COPY]], [[C]]
652 ; CHECK-NEXT: [[AND1:%[0-9]+]]:_(s32) = G_AND [[COPY1]], [[C]]
653 ; CHECK-NEXT: [[ICMP:%[0-9]+]]:_(s32) = G_ICMP intpred(ugt), [[AND]](s32), [[AND1]]
654 ; CHECK-NEXT: $x10 = COPY [[ICMP]](s32)
655 ; CHECK-NEXT: PseudoRET implicit $x10
656 %0:_(s32) = COPY $x10
657 %1:_(s32) = COPY $x11
658 %2:_(s8) = G_TRUNC %0(s32)
659 %3:_(s8) = G_TRUNC %1(s32)
660 %4:_(s1) = G_ICMP intpred(ugt), %2(s8), %3
661 %5:_(s32) = G_ANYEXT %4(s1)
663 PseudoRET implicit $x10
670 ; CHECK-LABEL: name: cmp_ugt_i16
671 ; CHECK: [[COPY:%[0-9]+]]:_(s32) = COPY $x10
672 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:_(s32) = COPY $x11
673 ; CHECK-NEXT: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 65535
674 ; CHECK-NEXT: [[AND:%[0-9]+]]:_(s32) = G_AND [[COPY]], [[C]]
675 ; CHECK-NEXT: [[AND1:%[0-9]+]]:_(s32) = G_AND [[COPY1]], [[C]]
676 ; CHECK-NEXT: [[ICMP:%[0-9]+]]:_(s32) = G_ICMP intpred(ugt), [[AND]](s32), [[AND1]]
677 ; CHECK-NEXT: $x10 = COPY [[ICMP]](s32)
678 ; CHECK-NEXT: PseudoRET implicit $x10
679 %0:_(s32) = COPY $x10
680 %1:_(s32) = COPY $x11
681 %2:_(s16) = G_TRUNC %0(s32)
682 %3:_(s16) = G_TRUNC %1(s32)
683 %4:_(s1) = G_ICMP intpred(ugt), %2(s16), %3
684 %5:_(s32) = G_ANYEXT %4(s1)
686 PseudoRET implicit $x10
693 ; CHECK-LABEL: name: cmp_ugt_i32
694 ; CHECK: [[COPY:%[0-9]+]]:_(s32) = COPY $x10
695 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:_(s32) = COPY $x11
696 ; CHECK-NEXT: [[ICMP:%[0-9]+]]:_(s32) = G_ICMP intpred(ugt), [[COPY]](s32), [[COPY1]]
697 ; CHECK-NEXT: $x10 = COPY [[ICMP]](s32)
698 ; CHECK-NEXT: PseudoRET implicit $x10
699 %0:_(s32) = COPY $x10
700 %1:_(s32) = COPY $x11
701 %2:_(s1) = G_ICMP intpred(ugt), %0(s32), %1
702 %3:_(s32) = G_ANYEXT %2(s1)
704 PseudoRET implicit $x10
711 ; CHECK-LABEL: name: cmp_ugt_i48
712 ; CHECK: %xhi:_(s32) = COPY $x10
713 ; CHECK-NEXT: %xlo:_(s32) = COPY $x11
714 ; CHECK-NEXT: %yhi:_(s32) = COPY $x12
715 ; CHECK-NEXT: %ylo:_(s32) = COPY $x13
716 ; CHECK-NEXT: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 -1
717 ; CHECK-NEXT: [[C1:%[0-9]+]]:_(s32) = G_CONSTANT i32 65535
718 ; CHECK-NEXT: [[AND:%[0-9]+]]:_(s32) = G_AND %xhi, [[C]]
719 ; CHECK-NEXT: [[AND1:%[0-9]+]]:_(s32) = G_AND %xlo, [[C1]]
720 ; CHECK-NEXT: [[AND2:%[0-9]+]]:_(s32) = G_AND %yhi, [[C]]
721 ; CHECK-NEXT: [[AND3:%[0-9]+]]:_(s32) = G_AND %ylo, [[C1]]
722 ; CHECK-NEXT: [[ICMP:%[0-9]+]]:_(s32) = G_ICMP intpred(ugt), [[AND]](s32), [[AND2]]
723 ; CHECK-NEXT: [[ICMP1:%[0-9]+]]:_(s32) = G_ICMP intpred(ugt), [[AND1]](s32), [[AND3]]
724 ; CHECK-NEXT: [[ICMP2:%[0-9]+]]:_(s32) = G_ICMP intpred(eq), [[AND1]](s32), [[AND3]]
725 ; CHECK-NEXT: [[SELECT:%[0-9]+]]:_(s32) = G_SELECT [[ICMP2]](s32), [[ICMP]], [[ICMP1]]
726 ; CHECK-NEXT: $x10 = COPY [[SELECT]](s32)
727 ; CHECK-NEXT: PseudoRET implicit $x10
728 %xhi:_(s32) = COPY $x10
729 %xlo:_(s32) = COPY $x11
730 %yhi:_(s32) = COPY $x12
731 %ylo:_(s32) = COPY $x13
732 %x0:_(s64) = G_MERGE_VALUES %xhi(s32), %xlo(s32)
733 %y0:_(s64) = G_MERGE_VALUES %yhi(s32), %ylo(s32)
734 %x:_(s48) = G_TRUNC %x0(s64)
735 %y:_(s48) = G_TRUNC %y0(s64)
736 %z:_(s1) = G_ICMP intpred(ugt), %x(s48), %y
737 %z0:_(s32) = G_ANYEXT %z(s1)
739 PseudoRET implicit $x10
746 ; CHECK-LABEL: name: cmp_ugt_i64
747 ; CHECK: %xhi:_(s32) = COPY $x10
748 ; CHECK-NEXT: %xlo:_(s32) = COPY $x11
749 ; CHECK-NEXT: %yhi:_(s32) = COPY $x12
750 ; CHECK-NEXT: %ylo:_(s32) = COPY $x13
751 ; CHECK-NEXT: [[ICMP:%[0-9]+]]:_(s32) = G_ICMP intpred(ugt), %xhi(s32), %yhi
752 ; CHECK-NEXT: [[ICMP1:%[0-9]+]]:_(s32) = G_ICMP intpred(ugt), %xlo(s32), %ylo
753 ; CHECK-NEXT: [[ICMP2:%[0-9]+]]:_(s32) = G_ICMP intpred(eq), %xlo(s32), %ylo
754 ; CHECK-NEXT: [[SELECT:%[0-9]+]]:_(s32) = G_SELECT [[ICMP2]](s32), [[ICMP]], [[ICMP1]]
755 ; CHECK-NEXT: $x10 = COPY [[SELECT]](s32)
756 ; CHECK-NEXT: PseudoRET implicit $x10
757 %xhi:_(s32) = COPY $x10
758 %xlo:_(s32) = COPY $x11
759 %yhi:_(s32) = COPY $x12
760 %ylo:_(s32) = COPY $x13
761 %x:_(s64) = G_MERGE_VALUES %xhi(s32), %xlo(s32)
762 %y:_(s64) = G_MERGE_VALUES %yhi(s32), %ylo(s32)
763 %z:_(s1) = G_ICMP intpred(ugt), %x, %y
764 %z0:_(s32) = G_ANYEXT %z(s1)
766 PseudoRET implicit $x10
773 ; CHECK-LABEL: name: cmp_ult_i7
774 ; CHECK: [[COPY:%[0-9]+]]:_(s32) = COPY $x10
775 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:_(s32) = COPY $x11
776 ; CHECK-NEXT: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 127
777 ; CHECK-NEXT: [[AND:%[0-9]+]]:_(s32) = G_AND [[COPY]], [[C]]
778 ; CHECK-NEXT: [[AND1:%[0-9]+]]:_(s32) = G_AND [[COPY1]], [[C]]
779 ; CHECK-NEXT: [[ICMP:%[0-9]+]]:_(s32) = G_ICMP intpred(ult), [[AND]](s32), [[AND1]]
780 ; CHECK-NEXT: $x10 = COPY [[ICMP]](s32)
781 ; CHECK-NEXT: PseudoRET implicit $x10
782 %0:_(s32) = COPY $x10
783 %1:_(s32) = COPY $x11
784 %2:_(s7) = G_TRUNC %0(s32)
785 %3:_(s7) = G_TRUNC %1(s32)
786 %4:_(s1) = G_ICMP intpred(ult), %2(s7), %3
787 %5:_(s32) = G_ANYEXT %4(s1)
789 PseudoRET implicit $x10
796 ; CHECK-LABEL: name: cmp_ult_i8
797 ; CHECK: [[COPY:%[0-9]+]]:_(s32) = COPY $x10
798 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:_(s32) = COPY $x11
799 ; CHECK-NEXT: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 255
800 ; CHECK-NEXT: [[AND:%[0-9]+]]:_(s32) = G_AND [[COPY]], [[C]]
801 ; CHECK-NEXT: [[AND1:%[0-9]+]]:_(s32) = G_AND [[COPY1]], [[C]]
802 ; CHECK-NEXT: [[ICMP:%[0-9]+]]:_(s32) = G_ICMP intpred(ult), [[AND]](s32), [[AND1]]
803 ; CHECK-NEXT: $x10 = COPY [[ICMP]](s32)
804 ; CHECK-NEXT: PseudoRET implicit $x10
805 %0:_(s32) = COPY $x10
806 %1:_(s32) = COPY $x11
807 %2:_(s8) = G_TRUNC %0(s32)
808 %3:_(s8) = G_TRUNC %1(s32)
809 %4:_(s1) = G_ICMP intpred(ult), %2(s8), %3
810 %5:_(s32) = G_ANYEXT %4(s1)
812 PseudoRET implicit $x10
819 ; CHECK-LABEL: name: cmp_ult_i16
820 ; CHECK: [[COPY:%[0-9]+]]:_(s32) = COPY $x10
821 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:_(s32) = COPY $x11
822 ; CHECK-NEXT: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 65535
823 ; CHECK-NEXT: [[AND:%[0-9]+]]:_(s32) = G_AND [[COPY]], [[C]]
824 ; CHECK-NEXT: [[AND1:%[0-9]+]]:_(s32) = G_AND [[COPY1]], [[C]]
825 ; CHECK-NEXT: [[ICMP:%[0-9]+]]:_(s32) = G_ICMP intpred(ult), [[AND]](s32), [[AND1]]
826 ; CHECK-NEXT: $x10 = COPY [[ICMP]](s32)
827 ; CHECK-NEXT: PseudoRET implicit $x10
828 %0:_(s32) = COPY $x10
829 %1:_(s32) = COPY $x11
830 %2:_(s16) = G_TRUNC %0(s32)
831 %3:_(s16) = G_TRUNC %1(s32)
832 %4:_(s1) = G_ICMP intpred(ult), %2(s16), %3
833 %5:_(s32) = G_ANYEXT %4(s1)
835 PseudoRET implicit $x10
842 ; CHECK-LABEL: name: cmp_ult_i32
843 ; CHECK: [[COPY:%[0-9]+]]:_(s32) = COPY $x10
844 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:_(s32) = COPY $x11
845 ; CHECK-NEXT: [[ICMP:%[0-9]+]]:_(s32) = G_ICMP intpred(ult), [[COPY]](s32), [[COPY1]]
846 ; CHECK-NEXT: $x10 = COPY [[ICMP]](s32)
847 ; CHECK-NEXT: PseudoRET implicit $x10
848 %0:_(s32) = COPY $x10
849 %1:_(s32) = COPY $x11
850 %2:_(s1) = G_ICMP intpred(ult), %0(s32), %1
851 %3:_(s32) = G_ANYEXT %2(s1)
853 PseudoRET implicit $x10
860 ; CHECK-LABEL: name: cmp_ult_i48
861 ; CHECK: %xhi:_(s32) = COPY $x10
862 ; CHECK-NEXT: %xlo:_(s32) = COPY $x11
863 ; CHECK-NEXT: %yhi:_(s32) = COPY $x12
864 ; CHECK-NEXT: %ylo:_(s32) = COPY $x13
865 ; CHECK-NEXT: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 -1
866 ; CHECK-NEXT: [[C1:%[0-9]+]]:_(s32) = G_CONSTANT i32 65535
867 ; CHECK-NEXT: [[AND:%[0-9]+]]:_(s32) = G_AND %xhi, [[C]]
868 ; CHECK-NEXT: [[AND1:%[0-9]+]]:_(s32) = G_AND %xlo, [[C1]]
869 ; CHECK-NEXT: [[AND2:%[0-9]+]]:_(s32) = G_AND %yhi, [[C]]
870 ; CHECK-NEXT: [[AND3:%[0-9]+]]:_(s32) = G_AND %ylo, [[C1]]
871 ; CHECK-NEXT: [[ICMP:%[0-9]+]]:_(s32) = G_ICMP intpred(ult), [[AND]](s32), [[AND2]]
872 ; CHECK-NEXT: [[ICMP1:%[0-9]+]]:_(s32) = G_ICMP intpred(ult), [[AND1]](s32), [[AND3]]
873 ; CHECK-NEXT: [[ICMP2:%[0-9]+]]:_(s32) = G_ICMP intpred(eq), [[AND1]](s32), [[AND3]]
874 ; CHECK-NEXT: [[SELECT:%[0-9]+]]:_(s32) = G_SELECT [[ICMP2]](s32), [[ICMP]], [[ICMP1]]
875 ; CHECK-NEXT: $x10 = COPY [[SELECT]](s32)
876 ; CHECK-NEXT: PseudoRET implicit $x10
877 %xhi:_(s32) = COPY $x10
878 %xlo:_(s32) = COPY $x11
879 %yhi:_(s32) = COPY $x12
880 %ylo:_(s32) = COPY $x13
881 %x0:_(s64) = G_MERGE_VALUES %xhi(s32), %xlo(s32)
882 %y0:_(s64) = G_MERGE_VALUES %yhi(s32), %ylo(s32)
883 %x:_(s48) = G_TRUNC %x0(s64)
884 %y:_(s48) = G_TRUNC %y0(s64)
885 %z:_(s1) = G_ICMP intpred(ult), %x(s48), %y
886 %z0:_(s32) = G_ANYEXT %z(s1)
888 PseudoRET implicit $x10
895 ; CHECK-LABEL: name: cmp_ult_i64
896 ; CHECK: %xhi:_(s32) = COPY $x10
897 ; CHECK-NEXT: %xlo:_(s32) = COPY $x11
898 ; CHECK-NEXT: %yhi:_(s32) = COPY $x12
899 ; CHECK-NEXT: %ylo:_(s32) = COPY $x13
900 ; CHECK-NEXT: [[ICMP:%[0-9]+]]:_(s32) = G_ICMP intpred(uge), %xhi(s32), %yhi
901 ; CHECK-NEXT: [[ICMP1:%[0-9]+]]:_(s32) = G_ICMP intpred(sge), %xlo(s32), %ylo
902 ; CHECK-NEXT: [[ICMP2:%[0-9]+]]:_(s32) = G_ICMP intpred(eq), %xlo(s32), %ylo
903 ; CHECK-NEXT: [[SELECT:%[0-9]+]]:_(s32) = G_SELECT [[ICMP2]](s32), [[ICMP]], [[ICMP1]]
904 ; CHECK-NEXT: $x10 = COPY [[SELECT]](s32)
905 ; CHECK-NEXT: PseudoRET implicit $x10
906 %xhi:_(s32) = COPY $x10
907 %xlo:_(s32) = COPY $x11
908 %yhi:_(s32) = COPY $x12
909 %ylo:_(s32) = COPY $x13
910 %x:_(s64) = G_MERGE_VALUES %xhi(s32), %xlo(s32)
911 %y:_(s64) = G_MERGE_VALUES %yhi(s32), %ylo(s32)
912 %z:_(s1) = G_ICMP intpred(sge), %x, %y
913 %z0:_(s32) = G_ANYEXT %z(s1)
915 PseudoRET implicit $x10
922 ; CHECK-LABEL: name: cmp_uge_i7
923 ; CHECK: [[COPY:%[0-9]+]]:_(s32) = COPY $x10
924 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:_(s32) = COPY $x11
925 ; CHECK-NEXT: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 127
926 ; CHECK-NEXT: [[AND:%[0-9]+]]:_(s32) = G_AND [[COPY]], [[C]]
927 ; CHECK-NEXT: [[AND1:%[0-9]+]]:_(s32) = G_AND [[COPY1]], [[C]]
928 ; CHECK-NEXT: [[ICMP:%[0-9]+]]:_(s32) = G_ICMP intpred(uge), [[AND]](s32), [[AND1]]
929 ; CHECK-NEXT: $x10 = COPY [[ICMP]](s32)
930 ; CHECK-NEXT: PseudoRET implicit $x10
931 %0:_(s32) = COPY $x10
932 %1:_(s32) = COPY $x11
933 %2:_(s7) = G_TRUNC %0(s32)
934 %3:_(s7) = G_TRUNC %1(s32)
935 %4:_(s1) = G_ICMP intpred(uge), %2(s7), %3
936 %5:_(s32) = G_ANYEXT %4(s1)
938 PseudoRET implicit $x10
945 ; CHECK-LABEL: name: cmp_uge_i8
946 ; CHECK: [[COPY:%[0-9]+]]:_(s32) = COPY $x10
947 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:_(s32) = COPY $x11
948 ; CHECK-NEXT: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 255
949 ; CHECK-NEXT: [[AND:%[0-9]+]]:_(s32) = G_AND [[COPY]], [[C]]
950 ; CHECK-NEXT: [[AND1:%[0-9]+]]:_(s32) = G_AND [[COPY1]], [[C]]
951 ; CHECK-NEXT: [[ICMP:%[0-9]+]]:_(s32) = G_ICMP intpred(uge), [[AND]](s32), [[AND1]]
952 ; CHECK-NEXT: $x10 = COPY [[ICMP]](s32)
953 ; CHECK-NEXT: PseudoRET implicit $x10
954 %0:_(s32) = COPY $x10
955 %1:_(s32) = COPY $x11
956 %2:_(s8) = G_TRUNC %0(s32)
957 %3:_(s8) = G_TRUNC %1(s32)
958 %4:_(s1) = G_ICMP intpred(uge), %2(s8), %3
959 %5:_(s32) = G_ANYEXT %4(s1)
961 PseudoRET implicit $x10
968 ; CHECK-LABEL: name: cmp_uge_i16
969 ; CHECK: [[COPY:%[0-9]+]]:_(s32) = COPY $x10
970 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:_(s32) = COPY $x11
971 ; CHECK-NEXT: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 65535
972 ; CHECK-NEXT: [[AND:%[0-9]+]]:_(s32) = G_AND [[COPY]], [[C]]
973 ; CHECK-NEXT: [[AND1:%[0-9]+]]:_(s32) = G_AND [[COPY1]], [[C]]
974 ; CHECK-NEXT: [[ICMP:%[0-9]+]]:_(s32) = G_ICMP intpred(uge), [[AND]](s32), [[AND1]]
975 ; CHECK-NEXT: $x10 = COPY [[ICMP]](s32)
976 ; CHECK-NEXT: PseudoRET implicit $x10
977 %0:_(s32) = COPY $x10
978 %1:_(s32) = COPY $x11
979 %2:_(s16) = G_TRUNC %0(s32)
980 %3:_(s16) = G_TRUNC %1(s32)
981 %4:_(s1) = G_ICMP intpred(uge), %2(s16), %3
982 %5:_(s32) = G_ANYEXT %4(s1)
984 PseudoRET implicit $x10
991 ; CHECK-LABEL: name: cmp_uge_i32
992 ; CHECK: [[COPY:%[0-9]+]]:_(s32) = COPY $x10
993 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:_(s32) = COPY $x11
994 ; CHECK-NEXT: [[ICMP:%[0-9]+]]:_(s32) = G_ICMP intpred(uge), [[COPY]](s32), [[COPY1]]
995 ; CHECK-NEXT: $x10 = COPY [[ICMP]](s32)
996 ; CHECK-NEXT: PseudoRET implicit $x10
997 %0:_(s32) = COPY $x10
998 %1:_(s32) = COPY $x11
999 %2:_(s1) = G_ICMP intpred(uge), %0(s32), %1
1000 %3:_(s32) = G_ANYEXT %2(s1)
1002 PseudoRET implicit $x10
1009 ; CHECK-LABEL: name: cmp_uge_i48
1010 ; CHECK: %xhi:_(s32) = COPY $x10
1011 ; CHECK-NEXT: %xlo:_(s32) = COPY $x11
1012 ; CHECK-NEXT: %yhi:_(s32) = COPY $x12
1013 ; CHECK-NEXT: %ylo:_(s32) = COPY $x13
1014 ; CHECK-NEXT: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 -1
1015 ; CHECK-NEXT: [[C1:%[0-9]+]]:_(s32) = G_CONSTANT i32 65535
1016 ; CHECK-NEXT: [[AND:%[0-9]+]]:_(s32) = G_AND %xhi, [[C]]
1017 ; CHECK-NEXT: [[AND1:%[0-9]+]]:_(s32) = G_AND %xlo, [[C1]]
1018 ; CHECK-NEXT: [[AND2:%[0-9]+]]:_(s32) = G_AND %yhi, [[C]]
1019 ; CHECK-NEXT: [[AND3:%[0-9]+]]:_(s32) = G_AND %ylo, [[C1]]
1020 ; CHECK-NEXT: [[ICMP:%[0-9]+]]:_(s32) = G_ICMP intpred(uge), [[AND]](s32), [[AND2]]
1021 ; CHECK-NEXT: [[ICMP1:%[0-9]+]]:_(s32) = G_ICMP intpred(uge), [[AND1]](s32), [[AND3]]
1022 ; CHECK-NEXT: [[ICMP2:%[0-9]+]]:_(s32) = G_ICMP intpred(eq), [[AND1]](s32), [[AND3]]
1023 ; CHECK-NEXT: [[SELECT:%[0-9]+]]:_(s32) = G_SELECT [[ICMP2]](s32), [[ICMP]], [[ICMP1]]
1024 ; CHECK-NEXT: $x10 = COPY [[SELECT]](s32)
1025 ; CHECK-NEXT: PseudoRET implicit $x10
1026 %xhi:_(s32) = COPY $x10
1027 %xlo:_(s32) = COPY $x11
1028 %yhi:_(s32) = COPY $x12
1029 %ylo:_(s32) = COPY $x13
1030 %x0:_(s64) = G_MERGE_VALUES %xhi(s32), %xlo(s32)
1031 %y0:_(s64) = G_MERGE_VALUES %yhi(s32), %ylo(s32)
1032 %x:_(s48) = G_TRUNC %x0(s64)
1033 %y:_(s48) = G_TRUNC %y0(s64)
1034 %z:_(s1) = G_ICMP intpred(uge), %x(s48), %y
1035 %z0:_(s32) = G_ANYEXT %z(s1)
1036 $x10 = COPY %z0(s32)
1037 PseudoRET implicit $x10
1044 ; CHECK-LABEL: name: cmp_uge_i64
1045 ; CHECK: %xhi:_(s32) = COPY $x10
1046 ; CHECK-NEXT: %xlo:_(s32) = COPY $x11
1047 ; CHECK-NEXT: %yhi:_(s32) = COPY $x12
1048 ; CHECK-NEXT: %ylo:_(s32) = COPY $x13
1049 ; CHECK-NEXT: [[ICMP:%[0-9]+]]:_(s32) = G_ICMP intpred(uge), %xhi(s32), %yhi
1050 ; CHECK-NEXT: [[ICMP1:%[0-9]+]]:_(s32) = G_ICMP intpred(uge), %xlo(s32), %ylo
1051 ; CHECK-NEXT: [[ICMP2:%[0-9]+]]:_(s32) = G_ICMP intpred(eq), %xlo(s32), %ylo
1052 ; CHECK-NEXT: [[SELECT:%[0-9]+]]:_(s32) = G_SELECT [[ICMP2]](s32), [[ICMP]], [[ICMP1]]
1053 ; CHECK-NEXT: $x10 = COPY [[SELECT]](s32)
1054 ; CHECK-NEXT: PseudoRET implicit $x10
1055 %xhi:_(s32) = COPY $x10
1056 %xlo:_(s32) = COPY $x11
1057 %yhi:_(s32) = COPY $x12
1058 %ylo:_(s32) = COPY $x13
1059 %x:_(s64) = G_MERGE_VALUES %xhi(s32), %xlo(s32)
1060 %y:_(s64) = G_MERGE_VALUES %yhi(s32), %ylo(s32)
1061 %z:_(s1) = G_ICMP intpred(uge), %x, %y
1062 %z0:_(s32) = G_ANYEXT %z(s1)
1063 $x10 = COPY %z0(s32)
1064 PseudoRET implicit $x10
1071 ; CHECK-LABEL: name: cmp_ule_i7
1072 ; CHECK: [[COPY:%[0-9]+]]:_(s32) = COPY $x10
1073 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:_(s32) = COPY $x11
1074 ; CHECK-NEXT: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 127
1075 ; CHECK-NEXT: [[AND:%[0-9]+]]:_(s32) = G_AND [[COPY]], [[C]]
1076 ; CHECK-NEXT: [[AND1:%[0-9]+]]:_(s32) = G_AND [[COPY1]], [[C]]
1077 ; CHECK-NEXT: [[ICMP:%[0-9]+]]:_(s32) = G_ICMP intpred(ule), [[AND]](s32), [[AND1]]
1078 ; CHECK-NEXT: $x10 = COPY [[ICMP]](s32)
1079 ; CHECK-NEXT: PseudoRET implicit $x10
1080 %0:_(s32) = COPY $x10
1081 %1:_(s32) = COPY $x11
1082 %2:_(s7) = G_TRUNC %0(s32)
1083 %3:_(s7) = G_TRUNC %1(s32)
1084 %4:_(s1) = G_ICMP intpred(ule), %2(s7), %3
1085 %5:_(s32) = G_ANYEXT %4(s1)
1087 PseudoRET implicit $x10
1094 ; CHECK-LABEL: name: cmp_ule_i8
1095 ; CHECK: [[COPY:%[0-9]+]]:_(s32) = COPY $x10
1096 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:_(s32) = COPY $x11
1097 ; CHECK-NEXT: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 255
1098 ; CHECK-NEXT: [[AND:%[0-9]+]]:_(s32) = G_AND [[COPY]], [[C]]
1099 ; CHECK-NEXT: [[AND1:%[0-9]+]]:_(s32) = G_AND [[COPY1]], [[C]]
1100 ; CHECK-NEXT: [[ICMP:%[0-9]+]]:_(s32) = G_ICMP intpred(ule), [[AND]](s32), [[AND1]]
1101 ; CHECK-NEXT: $x10 = COPY [[ICMP]](s32)
1102 ; CHECK-NEXT: PseudoRET implicit $x10
1103 %0:_(s32) = COPY $x10
1104 %1:_(s32) = COPY $x11
1105 %2:_(s8) = G_TRUNC %0(s32)
1106 %3:_(s8) = G_TRUNC %1(s32)
1107 %4:_(s1) = G_ICMP intpred(ule), %2(s8), %3
1108 %5:_(s32) = G_ANYEXT %4(s1)
1110 PseudoRET implicit $x10
1117 ; CHECK-LABEL: name: cmp_ule_i16
1118 ; CHECK: [[COPY:%[0-9]+]]:_(s32) = COPY $x10
1119 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:_(s32) = COPY $x11
1120 ; CHECK-NEXT: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 65535
1121 ; CHECK-NEXT: [[AND:%[0-9]+]]:_(s32) = G_AND [[COPY]], [[C]]
1122 ; CHECK-NEXT: [[AND1:%[0-9]+]]:_(s32) = G_AND [[COPY1]], [[C]]
1123 ; CHECK-NEXT: [[ICMP:%[0-9]+]]:_(s32) = G_ICMP intpred(ule), [[AND]](s32), [[AND1]]
1124 ; CHECK-NEXT: $x10 = COPY [[ICMP]](s32)
1125 ; CHECK-NEXT: PseudoRET implicit $x10
1126 %0:_(s32) = COPY $x10
1127 %1:_(s32) = COPY $x11
1128 %2:_(s16) = G_TRUNC %0(s32)
1129 %3:_(s16) = G_TRUNC %1(s32)
1130 %4:_(s1) = G_ICMP intpred(ule), %2(s16), %3
1131 %5:_(s32) = G_ANYEXT %4(s1)
1133 PseudoRET implicit $x10
1140 ; CHECK-LABEL: name: cmp_ule_i32
1141 ; CHECK: [[COPY:%[0-9]+]]:_(s32) = COPY $x10
1142 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:_(s32) = COPY $x11
1143 ; CHECK-NEXT: [[ICMP:%[0-9]+]]:_(s32) = G_ICMP intpred(ule), [[COPY]](s32), [[COPY1]]
1144 ; CHECK-NEXT: $x10 = COPY [[ICMP]](s32)
1145 ; CHECK-NEXT: PseudoRET implicit $x10
1146 %0:_(s32) = COPY $x10
1147 %1:_(s32) = COPY $x11
1148 %2:_(s1) = G_ICMP intpred(ule), %0(s32), %1
1149 %3:_(s32) = G_ANYEXT %2(s1)
1151 PseudoRET implicit $x10
1158 ; CHECK-LABEL: name: cmp_ule_i48
1159 ; CHECK: %xhi:_(s32) = COPY $x10
1160 ; CHECK-NEXT: %xlo:_(s32) = COPY $x11
1161 ; CHECK-NEXT: %yhi:_(s32) = COPY $x12
1162 ; CHECK-NEXT: %ylo:_(s32) = COPY $x13
1163 ; CHECK-NEXT: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 -1
1164 ; CHECK-NEXT: [[C1:%[0-9]+]]:_(s32) = G_CONSTANT i32 65535
1165 ; CHECK-NEXT: [[AND:%[0-9]+]]:_(s32) = G_AND %xhi, [[C]]
1166 ; CHECK-NEXT: [[AND1:%[0-9]+]]:_(s32) = G_AND %xlo, [[C1]]
1167 ; CHECK-NEXT: [[AND2:%[0-9]+]]:_(s32) = G_AND %yhi, [[C]]
1168 ; CHECK-NEXT: [[AND3:%[0-9]+]]:_(s32) = G_AND %ylo, [[C1]]
1169 ; CHECK-NEXT: [[ICMP:%[0-9]+]]:_(s32) = G_ICMP intpred(ule), [[AND]](s32), [[AND2]]
1170 ; CHECK-NEXT: [[ICMP1:%[0-9]+]]:_(s32) = G_ICMP intpred(ule), [[AND1]](s32), [[AND3]]
1171 ; CHECK-NEXT: [[ICMP2:%[0-9]+]]:_(s32) = G_ICMP intpred(eq), [[AND1]](s32), [[AND3]]
1172 ; CHECK-NEXT: [[SELECT:%[0-9]+]]:_(s32) = G_SELECT [[ICMP2]](s32), [[ICMP]], [[ICMP1]]
1173 ; CHECK-NEXT: $x10 = COPY [[SELECT]](s32)
1174 ; CHECK-NEXT: PseudoRET implicit $x10
1175 %xhi:_(s32) = COPY $x10
1176 %xlo:_(s32) = COPY $x11
1177 %yhi:_(s32) = COPY $x12
1178 %ylo:_(s32) = COPY $x13
1179 %x0:_(s64) = G_MERGE_VALUES %xhi(s32), %xlo(s32)
1180 %y0:_(s64) = G_MERGE_VALUES %yhi(s32), %ylo(s32)
1181 %x:_(s48) = G_TRUNC %x0(s64)
1182 %y:_(s48) = G_TRUNC %y0(s64)
1183 %z:_(s1) = G_ICMP intpred(ule), %x(s48), %y
1184 %z0:_(s32) = G_ANYEXT %z(s1)
1185 $x10 = COPY %z0(s32)
1186 PseudoRET implicit $x10
1193 ; CHECK-LABEL: name: cmp_ule_i64
1194 ; CHECK: %xhi:_(s32) = COPY $x10
1195 ; CHECK-NEXT: %xlo:_(s32) = COPY $x11
1196 ; CHECK-NEXT: %yhi:_(s32) = COPY $x12
1197 ; CHECK-NEXT: %ylo:_(s32) = COPY $x13
1198 ; CHECK-NEXT: [[ICMP:%[0-9]+]]:_(s32) = G_ICMP intpred(ule), %xhi(s32), %yhi
1199 ; CHECK-NEXT: [[ICMP1:%[0-9]+]]:_(s32) = G_ICMP intpred(ule), %xlo(s32), %ylo
1200 ; CHECK-NEXT: [[ICMP2:%[0-9]+]]:_(s32) = G_ICMP intpred(eq), %xlo(s32), %ylo
1201 ; CHECK-NEXT: [[SELECT:%[0-9]+]]:_(s32) = G_SELECT [[ICMP2]](s32), [[ICMP]], [[ICMP1]]
1202 ; CHECK-NEXT: $x10 = COPY [[SELECT]](s32)
1203 ; CHECK-NEXT: PseudoRET implicit $x10
1204 %xhi:_(s32) = COPY $x10
1205 %xlo:_(s32) = COPY $x11
1206 %yhi:_(s32) = COPY $x12
1207 %ylo:_(s32) = COPY $x13
1208 %x:_(s64) = G_MERGE_VALUES %xhi(s32), %xlo(s32)
1209 %y:_(s64) = G_MERGE_VALUES %yhi(s32), %ylo(s32)
1210 %z:_(s1) = G_ICMP intpred(ule), %x, %y
1211 %z0:_(s32) = G_ANYEXT %z(s1)
1212 $x10 = COPY %z0(s32)
1213 PseudoRET implicit $x10
1220 ; CHECK-LABEL: name: cmp_eq_i7
1221 ; CHECK: [[COPY:%[0-9]+]]:_(s32) = COPY $x10
1222 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:_(s32) = COPY $x11
1223 ; CHECK-NEXT: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 127
1224 ; CHECK-NEXT: [[AND:%[0-9]+]]:_(s32) = G_AND [[COPY]], [[C]]
1225 ; CHECK-NEXT: [[AND1:%[0-9]+]]:_(s32) = G_AND [[COPY1]], [[C]]
1226 ; CHECK-NEXT: [[ICMP:%[0-9]+]]:_(s32) = G_ICMP intpred(eq), [[AND]](s32), [[AND1]]
1227 ; CHECK-NEXT: $x10 = COPY [[ICMP]](s32)
1228 ; CHECK-NEXT: PseudoRET implicit $x10
1229 %0:_(s32) = COPY $x10
1230 %1:_(s32) = COPY $x11
1231 %2:_(s7) = G_TRUNC %0(s32)
1232 %3:_(s7) = G_TRUNC %1(s32)
1233 %4:_(s1) = G_ICMP intpred(eq), %2(s7), %3
1234 %5:_(s32) = G_ANYEXT %4(s1)
1236 PseudoRET implicit $x10
1243 ; CHECK-LABEL: name: cmp_eq_i8
1244 ; CHECK: [[COPY:%[0-9]+]]:_(s32) = COPY $x10
1245 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:_(s32) = COPY $x11
1246 ; CHECK-NEXT: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 255
1247 ; CHECK-NEXT: [[AND:%[0-9]+]]:_(s32) = G_AND [[COPY]], [[C]]
1248 ; CHECK-NEXT: [[AND1:%[0-9]+]]:_(s32) = G_AND [[COPY1]], [[C]]
1249 ; CHECK-NEXT: [[ICMP:%[0-9]+]]:_(s32) = G_ICMP intpred(eq), [[AND]](s32), [[AND1]]
1250 ; CHECK-NEXT: $x10 = COPY [[ICMP]](s32)
1251 ; CHECK-NEXT: PseudoRET implicit $x10
1252 %0:_(s32) = COPY $x10
1253 %1:_(s32) = COPY $x11
1254 %2:_(s8) = G_TRUNC %0(s32)
1255 %3:_(s8) = G_TRUNC %1(s32)
1256 %4:_(s1) = G_ICMP intpred(eq), %2(s8), %3
1257 %5:_(s32) = G_ANYEXT %4(s1)
1259 PseudoRET implicit $x10
1266 ; CHECK-LABEL: name: cmp_eq_i16
1267 ; CHECK: [[COPY:%[0-9]+]]:_(s32) = COPY $x10
1268 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:_(s32) = COPY $x11
1269 ; CHECK-NEXT: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 65535
1270 ; CHECK-NEXT: [[AND:%[0-9]+]]:_(s32) = G_AND [[COPY]], [[C]]
1271 ; CHECK-NEXT: [[AND1:%[0-9]+]]:_(s32) = G_AND [[COPY1]], [[C]]
1272 ; CHECK-NEXT: [[ICMP:%[0-9]+]]:_(s32) = G_ICMP intpred(eq), [[AND]](s32), [[AND1]]
1273 ; CHECK-NEXT: $x10 = COPY [[ICMP]](s32)
1274 ; CHECK-NEXT: PseudoRET implicit $x10
1275 %0:_(s32) = COPY $x10
1276 %1:_(s32) = COPY $x11
1277 %2:_(s16) = G_TRUNC %0(s32)
1278 %3:_(s16) = G_TRUNC %1(s32)
1279 %4:_(s1) = G_ICMP intpred(eq), %2(s16), %3
1280 %5:_(s32) = G_ANYEXT %4(s1)
1282 PseudoRET implicit $x10
1289 ; CHECK-LABEL: name: cmp_eq_i32
1290 ; CHECK: [[COPY:%[0-9]+]]:_(s32) = COPY $x10
1291 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:_(s32) = COPY $x11
1292 ; CHECK-NEXT: [[ICMP:%[0-9]+]]:_(s32) = G_ICMP intpred(eq), [[COPY]](s32), [[COPY1]]
1293 ; CHECK-NEXT: $x10 = COPY [[ICMP]](s32)
1294 ; CHECK-NEXT: PseudoRET implicit $x10
1295 %0:_(s32) = COPY $x10
1296 %1:_(s32) = COPY $x11
1297 %2:_(s1) = G_ICMP intpred(eq), %0(s32), %1
1298 %3:_(s32) = G_ANYEXT %2(s1)
1300 PseudoRET implicit $x10
1307 ; CHECK-LABEL: name: cmp_eq_i48
1308 ; CHECK: %xhi:_(s32) = COPY $x10
1309 ; CHECK-NEXT: %xlo:_(s32) = COPY $x11
1310 ; CHECK-NEXT: %yhi:_(s32) = COPY $x12
1311 ; CHECK-NEXT: %ylo:_(s32) = COPY $x13
1312 ; CHECK-NEXT: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 -1
1313 ; CHECK-NEXT: [[C1:%[0-9]+]]:_(s32) = G_CONSTANT i32 65535
1314 ; CHECK-NEXT: [[AND:%[0-9]+]]:_(s32) = G_AND %xhi, [[C]]
1315 ; CHECK-NEXT: [[AND1:%[0-9]+]]:_(s32) = G_AND %xlo, [[C1]]
1316 ; CHECK-NEXT: [[AND2:%[0-9]+]]:_(s32) = G_AND %yhi, [[C]]
1317 ; CHECK-NEXT: [[AND3:%[0-9]+]]:_(s32) = G_AND %ylo, [[C1]]
1318 ; CHECK-NEXT: [[C2:%[0-9]+]]:_(s32) = G_CONSTANT i32 0
1319 ; CHECK-NEXT: [[XOR:%[0-9]+]]:_(s32) = G_XOR [[AND]], [[AND2]]
1320 ; CHECK-NEXT: [[XOR1:%[0-9]+]]:_(s32) = G_XOR [[AND1]], [[AND3]]
1321 ; CHECK-NEXT: [[OR:%[0-9]+]]:_(s32) = G_OR [[XOR]], [[XOR1]]
1322 ; CHECK-NEXT: [[ICMP:%[0-9]+]]:_(s32) = G_ICMP intpred(eq), [[OR]](s32), [[C2]]
1323 ; CHECK-NEXT: $x10 = COPY [[ICMP]](s32)
1324 ; CHECK-NEXT: PseudoRET implicit $x10
1325 %xhi:_(s32) = COPY $x10
1326 %xlo:_(s32) = COPY $x11
1327 %yhi:_(s32) = COPY $x12
1328 %ylo:_(s32) = COPY $x13
1329 %x0:_(s64) = G_MERGE_VALUES %xhi(s32), %xlo(s32)
1330 %y0:_(s64) = G_MERGE_VALUES %yhi(s32), %ylo(s32)
1331 %x:_(s48) = G_TRUNC %x0(s64)
1332 %y:_(s48) = G_TRUNC %y0(s64)
1333 %z:_(s1) = G_ICMP intpred(eq), %x(s48), %y
1334 %z0:_(s32) = G_ANYEXT %z(s1)
1335 $x10 = COPY %z0(s32)
1336 PseudoRET implicit $x10
1343 ; CHECK-LABEL: name: cmp_eq_i64
1344 ; CHECK: %xhi:_(s32) = COPY $x10
1345 ; CHECK-NEXT: %xlo:_(s32) = COPY $x11
1346 ; CHECK-NEXT: %yhi:_(s32) = COPY $x12
1347 ; CHECK-NEXT: %ylo:_(s32) = COPY $x13
1348 ; CHECK-NEXT: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 0
1349 ; CHECK-NEXT: [[XOR:%[0-9]+]]:_(s32) = G_XOR %xhi, %yhi
1350 ; CHECK-NEXT: [[XOR1:%[0-9]+]]:_(s32) = G_XOR %xlo, %ylo
1351 ; CHECK-NEXT: [[OR:%[0-9]+]]:_(s32) = G_OR [[XOR]], [[XOR1]]
1352 ; CHECK-NEXT: [[ICMP:%[0-9]+]]:_(s32) = G_ICMP intpred(eq), [[OR]](s32), [[C]]
1353 ; CHECK-NEXT: $x10 = COPY [[ICMP]](s32)
1354 ; CHECK-NEXT: PseudoRET implicit $x10
1355 %xhi:_(s32) = COPY $x10
1356 %xlo:_(s32) = COPY $x11
1357 %yhi:_(s32) = COPY $x12
1358 %ylo:_(s32) = COPY $x13
1359 %x:_(s64) = G_MERGE_VALUES %xhi(s32), %xlo(s32)
1360 %y:_(s64) = G_MERGE_VALUES %yhi(s32), %ylo(s32)
1361 %z:_(s1) = G_ICMP intpred(eq), %x, %y
1362 %z0:_(s32) = G_ANYEXT %z(s1)
1363 $x10 = COPY %z0(s32)
1364 PseudoRET implicit $x10
1371 ; CHECK-LABEL: name: cmp_ne_i7
1372 ; CHECK: [[COPY:%[0-9]+]]:_(s32) = COPY $x10
1373 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:_(s32) = COPY $x11
1374 ; CHECK-NEXT: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 127
1375 ; CHECK-NEXT: [[AND:%[0-9]+]]:_(s32) = G_AND [[COPY]], [[C]]
1376 ; CHECK-NEXT: [[AND1:%[0-9]+]]:_(s32) = G_AND [[COPY1]], [[C]]
1377 ; CHECK-NEXT: [[ICMP:%[0-9]+]]:_(s32) = G_ICMP intpred(ne), [[AND]](s32), [[AND1]]
1378 ; CHECK-NEXT: $x10 = COPY [[ICMP]](s32)
1379 ; CHECK-NEXT: PseudoRET implicit $x10
1380 %0:_(s32) = COPY $x10
1381 %1:_(s32) = COPY $x11
1382 %2:_(s7) = G_TRUNC %0(s32)
1383 %3:_(s7) = G_TRUNC %1(s32)
1384 %4:_(s1) = G_ICMP intpred(ne), %2(s7), %3
1385 %5:_(s32) = G_ANYEXT %4(s1)
1387 PseudoRET implicit $x10
1394 ; CHECK-LABEL: name: cmp_ne_i8
1395 ; CHECK: [[COPY:%[0-9]+]]:_(s32) = COPY $x10
1396 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:_(s32) = COPY $x11
1397 ; CHECK-NEXT: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 255
1398 ; CHECK-NEXT: [[AND:%[0-9]+]]:_(s32) = G_AND [[COPY]], [[C]]
1399 ; CHECK-NEXT: [[AND1:%[0-9]+]]:_(s32) = G_AND [[COPY1]], [[C]]
1400 ; CHECK-NEXT: [[ICMP:%[0-9]+]]:_(s32) = G_ICMP intpred(ne), [[AND]](s32), [[AND1]]
1401 ; CHECK-NEXT: $x10 = COPY [[ICMP]](s32)
1402 ; CHECK-NEXT: PseudoRET implicit $x10
1403 %0:_(s32) = COPY $x10
1404 %1:_(s32) = COPY $x11
1405 %2:_(s8) = G_TRUNC %0(s32)
1406 %3:_(s8) = G_TRUNC %1(s32)
1407 %4:_(s1) = G_ICMP intpred(ne), %2(s8), %3
1408 %5:_(s32) = G_ANYEXT %4(s1)
1410 PseudoRET implicit $x10
1417 ; CHECK-LABEL: name: cmp_ne_i16
1418 ; CHECK: [[COPY:%[0-9]+]]:_(s32) = COPY $x10
1419 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:_(s32) = COPY $x11
1420 ; CHECK-NEXT: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 65535
1421 ; CHECK-NEXT: [[AND:%[0-9]+]]:_(s32) = G_AND [[COPY]], [[C]]
1422 ; CHECK-NEXT: [[AND1:%[0-9]+]]:_(s32) = G_AND [[COPY1]], [[C]]
1423 ; CHECK-NEXT: [[ICMP:%[0-9]+]]:_(s32) = G_ICMP intpred(ne), [[AND]](s32), [[AND1]]
1424 ; CHECK-NEXT: $x10 = COPY [[ICMP]](s32)
1425 ; CHECK-NEXT: PseudoRET implicit $x10
1426 %0:_(s32) = COPY $x10
1427 %1:_(s32) = COPY $x11
1428 %2:_(s16) = G_TRUNC %0(s32)
1429 %3:_(s16) = G_TRUNC %1(s32)
1430 %4:_(s1) = G_ICMP intpred(ne), %2(s16), %3
1431 %5:_(s32) = G_ANYEXT %4(s1)
1433 PseudoRET implicit $x10
1440 ; CHECK-LABEL: name: cmp_ne_i32
1441 ; CHECK: [[COPY:%[0-9]+]]:_(s32) = COPY $x10
1442 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:_(s32) = COPY $x11
1443 ; CHECK-NEXT: [[ICMP:%[0-9]+]]:_(s32) = G_ICMP intpred(ne), [[COPY]](s32), [[COPY1]]
1444 ; CHECK-NEXT: $x10 = COPY [[ICMP]](s32)
1445 ; CHECK-NEXT: PseudoRET implicit $x10
1446 %0:_(s32) = COPY $x10
1447 %1:_(s32) = COPY $x11
1448 %2:_(s1) = G_ICMP intpred(ne), %0(s32), %1
1449 %3:_(s32) = G_ANYEXT %2(s1)
1451 PseudoRET implicit $x10
1458 ; CHECK-LABEL: name: cmp_ne_i48
1459 ; CHECK: %xhi:_(s32) = COPY $x10
1460 ; CHECK-NEXT: %xlo:_(s32) = COPY $x11
1461 ; CHECK-NEXT: %yhi:_(s32) = COPY $x12
1462 ; CHECK-NEXT: %ylo:_(s32) = COPY $x13
1463 ; CHECK-NEXT: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 -1
1464 ; CHECK-NEXT: [[C1:%[0-9]+]]:_(s32) = G_CONSTANT i32 65535
1465 ; CHECK-NEXT: [[AND:%[0-9]+]]:_(s32) = G_AND %xhi, [[C]]
1466 ; CHECK-NEXT: [[AND1:%[0-9]+]]:_(s32) = G_AND %xlo, [[C1]]
1467 ; CHECK-NEXT: [[AND2:%[0-9]+]]:_(s32) = G_AND %yhi, [[C]]
1468 ; CHECK-NEXT: [[AND3:%[0-9]+]]:_(s32) = G_AND %ylo, [[C1]]
1469 ; CHECK-NEXT: [[C2:%[0-9]+]]:_(s32) = G_CONSTANT i32 0
1470 ; CHECK-NEXT: [[XOR:%[0-9]+]]:_(s32) = G_XOR [[AND]], [[AND2]]
1471 ; CHECK-NEXT: [[XOR1:%[0-9]+]]:_(s32) = G_XOR [[AND1]], [[AND3]]
1472 ; CHECK-NEXT: [[OR:%[0-9]+]]:_(s32) = G_OR [[XOR]], [[XOR1]]
1473 ; CHECK-NEXT: [[ICMP:%[0-9]+]]:_(s32) = G_ICMP intpred(ne), [[OR]](s32), [[C2]]
1474 ; CHECK-NEXT: $x10 = COPY [[ICMP]](s32)
1475 ; CHECK-NEXT: PseudoRET implicit $x10
1476 %xhi:_(s32) = COPY $x10
1477 %xlo:_(s32) = COPY $x11
1478 %yhi:_(s32) = COPY $x12
1479 %ylo:_(s32) = COPY $x13
1480 %x0:_(s64) = G_MERGE_VALUES %xhi(s32), %xlo(s32)
1481 %y0:_(s64) = G_MERGE_VALUES %yhi(s32), %ylo(s32)
1482 %x:_(s48) = G_TRUNC %x0(s64)
1483 %y:_(s48) = G_TRUNC %y0(s64)
1484 %z:_(s1) = G_ICMP intpred(ne), %x(s48), %y
1485 %z0:_(s32) = G_ANYEXT %z(s1)
1486 $x10 = COPY %z0(s32)
1487 PseudoRET implicit $x10
1494 ; CHECK-LABEL: name: cmp_ne_i64
1495 ; CHECK: %xhi:_(s32) = COPY $x10
1496 ; CHECK-NEXT: %xlo:_(s32) = COPY $x11
1497 ; CHECK-NEXT: %yhi:_(s32) = COPY $x12
1498 ; CHECK-NEXT: %ylo:_(s32) = COPY $x13
1499 ; CHECK-NEXT: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 0
1500 ; CHECK-NEXT: [[XOR:%[0-9]+]]:_(s32) = G_XOR %xhi, %yhi
1501 ; CHECK-NEXT: [[XOR1:%[0-9]+]]:_(s32) = G_XOR %xlo, %ylo
1502 ; CHECK-NEXT: [[OR:%[0-9]+]]:_(s32) = G_OR [[XOR]], [[XOR1]]
1503 ; CHECK-NEXT: [[ICMP:%[0-9]+]]:_(s32) = G_ICMP intpred(ne), [[OR]](s32), [[C]]
1504 ; CHECK-NEXT: $x10 = COPY [[ICMP]](s32)
1505 ; CHECK-NEXT: PseudoRET implicit $x10
1506 %xhi:_(s32) = COPY $x10
1507 %xlo:_(s32) = COPY $x11
1508 %yhi:_(s32) = COPY $x12
1509 %ylo:_(s32) = COPY $x13
1510 %x:_(s64) = G_MERGE_VALUES %xhi(s32), %xlo(s32)
1511 %y:_(s64) = G_MERGE_VALUES %yhi(s32), %ylo(s32)
1512 %z:_(s1) = G_ICMP intpred(ne), %x, %y
1513 %z0:_(s32) = G_ANYEXT %z(s1)
1514 $x10 = COPY %z0(s32)
1515 PseudoRET implicit $x10
1522 ; CHECK-LABEL: name: cmp_eq_ptr
1523 ; CHECK: [[COPY:%[0-9]+]]:_(p0) = COPY $x10
1524 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:_(p0) = COPY $x11
1525 ; CHECK-NEXT: [[ICMP:%[0-9]+]]:_(s32) = G_ICMP intpred(eq), [[COPY]](p0), [[COPY1]]
1526 ; CHECK-NEXT: $x10 = COPY [[ICMP]](s32)
1527 ; CHECK-NEXT: PseudoRET implicit $x10
1528 %0:_(p0) = COPY $x10
1529 %1:_(p0) = COPY $x11
1530 %2:_(s1) = G_ICMP intpred(eq), %0(p0), %1
1531 %3:_(s32) = G_ANYEXT %2(s1)
1533 PseudoRET implicit $x10
1542 ; CHECK-LABEL: name: cmp_slt_i128
1543 ; CHECK: liveins: $x10, $x11
1544 ; CHECK-NEXT: {{ $}}
1545 ; CHECK-NEXT: [[COPY:%[0-9]+]]:_(p0) = COPY $x10
1546 ; CHECK-NEXT: [[LOAD:%[0-9]+]]:_(s32) = G_LOAD [[COPY]](p0) :: (load (s32), align 8)
1547 ; CHECK-NEXT: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 4
1548 ; CHECK-NEXT: [[PTR_ADD:%[0-9]+]]:_(p0) = G_PTR_ADD [[COPY]], [[C]](s32)
1549 ; CHECK-NEXT: [[LOAD1:%[0-9]+]]:_(s32) = G_LOAD [[PTR_ADD]](p0) :: (load (s32) from unknown-address + 4)
1550 ; CHECK-NEXT: [[C1:%[0-9]+]]:_(s32) = G_CONSTANT i32 8
1551 ; CHECK-NEXT: [[PTR_ADD1:%[0-9]+]]:_(p0) = G_PTR_ADD [[COPY]], [[C1]](s32)
1552 ; CHECK-NEXT: [[LOAD2:%[0-9]+]]:_(s32) = G_LOAD [[PTR_ADD1]](p0) :: (load (s32) from unknown-address + 8, align 8)
1553 ; CHECK-NEXT: [[C2:%[0-9]+]]:_(s32) = G_CONSTANT i32 12
1554 ; CHECK-NEXT: [[PTR_ADD2:%[0-9]+]]:_(p0) = G_PTR_ADD [[COPY]], [[C2]](s32)
1555 ; CHECK-NEXT: [[LOAD3:%[0-9]+]]:_(s32) = G_LOAD [[PTR_ADD2]](p0) :: (load (s32) from unknown-address + 12)
1556 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:_(p0) = COPY $x11
1557 ; CHECK-NEXT: [[LOAD4:%[0-9]+]]:_(s32) = G_LOAD [[COPY1]](p0) :: (load (s32), align 8)
1558 ; CHECK-NEXT: [[PTR_ADD3:%[0-9]+]]:_(p0) = G_PTR_ADD [[COPY1]], [[C]](s32)
1559 ; CHECK-NEXT: [[LOAD5:%[0-9]+]]:_(s32) = G_LOAD [[PTR_ADD3]](p0) :: (load (s32) from unknown-address + 4)
1560 ; CHECK-NEXT: [[PTR_ADD4:%[0-9]+]]:_(p0) = G_PTR_ADD [[COPY1]], [[C1]](s32)
1561 ; CHECK-NEXT: [[LOAD6:%[0-9]+]]:_(s32) = G_LOAD [[PTR_ADD4]](p0) :: (load (s32) from unknown-address + 8, align 8)
1562 ; CHECK-NEXT: [[PTR_ADD5:%[0-9]+]]:_(p0) = G_PTR_ADD [[COPY1]], [[C2]](s32)
1563 ; CHECK-NEXT: [[LOAD7:%[0-9]+]]:_(s32) = G_LOAD [[PTR_ADD5]](p0) :: (load (s32) from unknown-address + 12)
1564 ; CHECK-NEXT: [[ICMP:%[0-9]+]]:_(s32) = G_ICMP intpred(ult), [[LOAD]](s32), [[LOAD4]]
1565 ; CHECK-NEXT: [[ICMP1:%[0-9]+]]:_(s32) = G_ICMP intpred(ult), [[LOAD1]](s32), [[LOAD5]]
1566 ; CHECK-NEXT: [[ICMP2:%[0-9]+]]:_(s32) = G_ICMP intpred(eq), [[LOAD1]](s32), [[LOAD5]]
1567 ; CHECK-NEXT: [[SELECT:%[0-9]+]]:_(s32) = G_SELECT [[ICMP2]](s32), [[ICMP]], [[ICMP1]]
1568 ; CHECK-NEXT: [[ICMP3:%[0-9]+]]:_(s32) = G_ICMP intpred(ult), [[LOAD2]](s32), [[LOAD6]]
1569 ; CHECK-NEXT: [[ICMP4:%[0-9]+]]:_(s32) = G_ICMP intpred(eq), [[LOAD2]](s32), [[LOAD6]]
1570 ; CHECK-NEXT: [[SELECT1:%[0-9]+]]:_(s32) = G_SELECT [[ICMP4]](s32), [[SELECT]], [[ICMP3]]
1571 ; CHECK-NEXT: [[ICMP5:%[0-9]+]]:_(s32) = G_ICMP intpred(slt), [[LOAD3]](s32), [[LOAD7]]
1572 ; CHECK-NEXT: [[ICMP6:%[0-9]+]]:_(s32) = G_ICMP intpred(eq), [[LOAD3]](s32), [[LOAD7]]
1573 ; CHECK-NEXT: [[SELECT2:%[0-9]+]]:_(s32) = G_SELECT [[ICMP6]](s32), [[SELECT1]], [[ICMP5]]
1574 ; CHECK-NEXT: $x10 = COPY [[SELECT2]](s32)
1575 ; CHECK-NEXT: PseudoRET implicit $x10
1576 %2:_(p0) = COPY $x10
1577 %0:_(s128) = G_LOAD %2(p0) :: (load (s128), align 8)
1578 %3:_(p0) = COPY $x11
1579 %1:_(s128) = G_LOAD %3(p0) :: (load (s128), align 8)
1580 %4:_(s1) = G_ICMP intpred(slt), %0(s128), %1
1581 %5:_(s32) = G_ANYEXT %4(s1)
1583 PseudoRET implicit $x10