1 # NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py
2 # RUN: llc -mtriple=riscv64 -run-pass=legalizer %s -o - \
8 ; CHECK-LABEL: name: cmp_sgt_i8
9 ; CHECK: [[COPY:%[0-9]+]]:_(s64) = COPY $x10
10 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:_(s64) = COPY $x11
11 ; CHECK-NEXT: [[C:%[0-9]+]]:_(s64) = G_CONSTANT i64 56
12 ; CHECK-NEXT: [[SHL:%[0-9]+]]:_(s64) = G_SHL [[COPY]], [[C]](s64)
13 ; CHECK-NEXT: [[ASHR:%[0-9]+]]:_(s64) = G_ASHR [[SHL]], [[C]](s64)
14 ; CHECK-NEXT: [[SHL1:%[0-9]+]]:_(s64) = G_SHL [[COPY1]], [[C]](s64)
15 ; CHECK-NEXT: [[ASHR1:%[0-9]+]]:_(s64) = G_ASHR [[SHL1]], [[C]](s64)
16 ; CHECK-NEXT: [[ICMP:%[0-9]+]]:_(s64) = G_ICMP intpred(sgt), [[ASHR]](s64), [[ASHR1]]
17 ; CHECK-NEXT: $x10 = COPY [[ICMP]](s64)
18 ; CHECK-NEXT: PseudoRET implicit $x10
21 %2:_(s8) = G_TRUNC %0(s64)
22 %3:_(s8) = G_TRUNC %1(s64)
23 %4:_(s1) = G_ICMP intpred(sgt), %2(s8), %3
24 %5:_(s64) = G_ANYEXT %4(s1)
26 PseudoRET implicit $x10
33 ; CHECK-LABEL: name: cmp_sgt_i15
34 ; CHECK: [[COPY:%[0-9]+]]:_(s64) = COPY $x10
35 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:_(s64) = COPY $x11
36 ; CHECK-NEXT: [[C:%[0-9]+]]:_(s64) = G_CONSTANT i64 49
37 ; CHECK-NEXT: [[SHL:%[0-9]+]]:_(s64) = G_SHL [[COPY]], [[C]](s64)
38 ; CHECK-NEXT: [[ASHR:%[0-9]+]]:_(s64) = G_ASHR [[SHL]], [[C]](s64)
39 ; CHECK-NEXT: [[SHL1:%[0-9]+]]:_(s64) = G_SHL [[COPY1]], [[C]](s64)
40 ; CHECK-NEXT: [[ASHR1:%[0-9]+]]:_(s64) = G_ASHR [[SHL1]], [[C]](s64)
41 ; CHECK-NEXT: [[ICMP:%[0-9]+]]:_(s64) = G_ICMP intpred(sgt), [[ASHR]](s64), [[ASHR1]]
42 ; CHECK-NEXT: $x10 = COPY [[ICMP]](s64)
43 ; CHECK-NEXT: PseudoRET implicit $x10
46 %2:_(s15) = G_TRUNC %0(s64)
47 %3:_(s15) = G_TRUNC %1(s64)
48 %4:_(s1) = G_ICMP intpred(sgt), %2(s15), %3
49 %5:_(s64) = G_ANYEXT %4(s1)
51 PseudoRET implicit $x10
58 ; CHECK-LABEL: name: cmp_sgt_i16
59 ; CHECK: [[COPY:%[0-9]+]]:_(s64) = COPY $x10
60 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:_(s64) = COPY $x11
61 ; CHECK-NEXT: [[C:%[0-9]+]]:_(s64) = G_CONSTANT i64 48
62 ; CHECK-NEXT: [[SHL:%[0-9]+]]:_(s64) = G_SHL [[COPY]], [[C]](s64)
63 ; CHECK-NEXT: [[ASHR:%[0-9]+]]:_(s64) = G_ASHR [[SHL]], [[C]](s64)
64 ; CHECK-NEXT: [[SHL1:%[0-9]+]]:_(s64) = G_SHL [[COPY1]], [[C]](s64)
65 ; CHECK-NEXT: [[ASHR1:%[0-9]+]]:_(s64) = G_ASHR [[SHL1]], [[C]](s64)
66 ; CHECK-NEXT: [[ICMP:%[0-9]+]]:_(s64) = G_ICMP intpred(sgt), [[ASHR]](s64), [[ASHR1]]
67 ; CHECK-NEXT: $x10 = COPY [[ICMP]](s64)
68 ; CHECK-NEXT: PseudoRET implicit $x10
71 %2:_(s16) = G_TRUNC %0(s64)
72 %3:_(s16) = G_TRUNC %1(s64)
73 %4:_(s1) = G_ICMP intpred(sgt), %2(s16), %3
74 %5:_(s64) = G_ANYEXT %4(s1)
76 PseudoRET implicit $x10
83 ; CHECK-LABEL: name: cmp_sgt_i32
84 ; CHECK: [[COPY:%[0-9]+]]:_(s64) = COPY $x10
85 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:_(s64) = COPY $x11
86 ; CHECK-NEXT: [[SEXT_INREG:%[0-9]+]]:_(s64) = G_SEXT_INREG [[COPY]], 32
87 ; CHECK-NEXT: [[SEXT_INREG1:%[0-9]+]]:_(s64) = G_SEXT_INREG [[COPY1]], 32
88 ; CHECK-NEXT: [[ICMP:%[0-9]+]]:_(s64) = G_ICMP intpred(sgt), [[SEXT_INREG]](s64), [[SEXT_INREG1]]
89 ; CHECK-NEXT: $x10 = COPY [[ICMP]](s64)
90 ; CHECK-NEXT: PseudoRET implicit $x10
93 %2:_(s32) = G_TRUNC %0(s64)
94 %3:_(s32) = G_TRUNC %1(s64)
95 %4:_(s1) = G_ICMP intpred(sgt), %2(s32), %3
96 %5:_(s64) = G_ANYEXT %4(s1)
98 PseudoRET implicit $x10
105 ; CHECK-LABEL: name: cmp_sgt_i64
106 ; CHECK: [[COPY:%[0-9]+]]:_(s64) = COPY $x10
107 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:_(s64) = COPY $x11
108 ; CHECK-NEXT: [[ICMP:%[0-9]+]]:_(s64) = G_ICMP intpred(sgt), [[COPY]](s64), [[COPY1]]
109 ; CHECK-NEXT: $x10 = COPY [[ICMP]](s64)
110 ; CHECK-NEXT: PseudoRET implicit $x10
111 %0:_(s64) = COPY $x10
112 %1:_(s64) = COPY $x11
113 %2:_(s1) = G_ICMP intpred(sgt), %0(s64), %1
114 %3:_(s64) = G_ANYEXT %2(s1)
116 PseudoRET implicit $x10
123 ; CHECK-LABEL: name: cmp_sgt_i72
124 ; CHECK: %xhi:_(s64) = COPY $x10
125 ; CHECK-NEXT: %xlo:_(s64) = COPY $x11
126 ; CHECK-NEXT: %yhi:_(s64) = COPY $x12
127 ; CHECK-NEXT: %ylo:_(s64) = COPY $x13
128 ; CHECK-NEXT: [[C:%[0-9]+]]:_(s64) = G_CONSTANT i64 56
129 ; CHECK-NEXT: [[SHL:%[0-9]+]]:_(s64) = G_SHL %xlo, [[C]](s64)
130 ; CHECK-NEXT: [[ASHR:%[0-9]+]]:_(s64) = G_ASHR [[SHL]], [[C]](s64)
131 ; CHECK-NEXT: [[SHL1:%[0-9]+]]:_(s64) = G_SHL %ylo, [[C]](s64)
132 ; CHECK-NEXT: [[ASHR1:%[0-9]+]]:_(s64) = G_ASHR [[SHL1]], [[C]](s64)
133 ; CHECK-NEXT: [[ICMP:%[0-9]+]]:_(s64) = G_ICMP intpred(sgt), [[ASHR]](s64), [[ASHR1]]
134 ; CHECK-NEXT: [[ICMP1:%[0-9]+]]:_(s64) = G_ICMP intpred(eq), [[ASHR]](s64), [[ASHR1]]
135 ; CHECK-NEXT: [[ICMP2:%[0-9]+]]:_(s64) = G_ICMP intpred(ugt), %xhi(s64), %yhi
136 ; CHECK-NEXT: [[TRUNC:%[0-9]+]]:_(s32) = G_TRUNC [[ICMP2]](s64)
137 ; CHECK-NEXT: [[TRUNC1:%[0-9]+]]:_(s32) = G_TRUNC [[ICMP]](s64)
138 ; CHECK-NEXT: [[SELECT:%[0-9]+]]:_(s32) = G_SELECT [[ICMP1]](s64), [[TRUNC]], [[TRUNC1]]
139 ; CHECK-NEXT: %z0:_(s64) = G_ANYEXT [[SELECT]](s32)
140 ; CHECK-NEXT: $x10 = COPY %z0(s64)
141 ; CHECK-NEXT: PseudoRET implicit $x10
142 %xhi:_(s64) = COPY $x10
143 %xlo:_(s64) = COPY $x11
144 %yhi:_(s64) = COPY $x12
145 %ylo:_(s64) = COPY $x13
146 %x0:_(s128) = G_MERGE_VALUES %xhi(s64), %xlo(s64)
147 %y0:_(s128) = G_MERGE_VALUES %yhi(s64), %ylo(s64)
148 %x:_(s72) = G_TRUNC %x0(s128)
149 %y:_(s72) = G_TRUNC %y0(s128)
150 %z:_(s1) = G_ICMP intpred(sgt), %x, %y
151 %z0:_(s64) = G_ANYEXT %z(s1)
153 PseudoRET implicit $x10
160 ; CHECK-LABEL: name: cmp_sgt_i128
161 ; CHECK: %xhi:_(s64) = COPY $x10
162 ; CHECK-NEXT: %xlo:_(s64) = COPY $x11
163 ; CHECK-NEXT: %yhi:_(s64) = COPY $x12
164 ; CHECK-NEXT: %ylo:_(s64) = COPY $x13
165 ; CHECK-NEXT: [[ICMP:%[0-9]+]]:_(s64) = G_ICMP intpred(sgt), %xlo(s64), %ylo
166 ; CHECK-NEXT: [[ICMP1:%[0-9]+]]:_(s64) = G_ICMP intpred(eq), %xlo(s64), %ylo
167 ; CHECK-NEXT: [[ICMP2:%[0-9]+]]:_(s64) = G_ICMP intpred(ugt), %xhi(s64), %yhi
168 ; CHECK-NEXT: [[TRUNC:%[0-9]+]]:_(s32) = G_TRUNC [[ICMP2]](s64)
169 ; CHECK-NEXT: [[TRUNC1:%[0-9]+]]:_(s32) = G_TRUNC [[ICMP]](s64)
170 ; CHECK-NEXT: [[SELECT:%[0-9]+]]:_(s32) = G_SELECT [[ICMP1]](s64), [[TRUNC]], [[TRUNC1]]
171 ; CHECK-NEXT: %z0:_(s64) = G_ANYEXT [[SELECT]](s32)
172 ; CHECK-NEXT: $x10 = COPY %z0(s64)
173 ; CHECK-NEXT: PseudoRET implicit $x10
174 %xhi:_(s64) = COPY $x10
175 %xlo:_(s64) = COPY $x11
176 %yhi:_(s64) = COPY $x12
177 %ylo:_(s64) = COPY $x13
178 %x:_(s128) = G_MERGE_VALUES %xhi(s64), %xlo(s64)
179 %y:_(s128) = G_MERGE_VALUES %yhi(s64), %ylo(s64)
180 %z:_(s1) = G_ICMP intpred(sgt), %x, %y
181 %z0:_(s64) = G_ANYEXT %z(s1)
183 PseudoRET implicit $x10
190 ; CHECK-LABEL: name: cmp_slt_i8
191 ; CHECK: [[COPY:%[0-9]+]]:_(s64) = COPY $x10
192 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:_(s64) = COPY $x11
193 ; CHECK-NEXT: [[C:%[0-9]+]]:_(s64) = G_CONSTANT i64 56
194 ; CHECK-NEXT: [[SHL:%[0-9]+]]:_(s64) = G_SHL [[COPY]], [[C]](s64)
195 ; CHECK-NEXT: [[ASHR:%[0-9]+]]:_(s64) = G_ASHR [[SHL]], [[C]](s64)
196 ; CHECK-NEXT: [[SHL1:%[0-9]+]]:_(s64) = G_SHL [[COPY1]], [[C]](s64)
197 ; CHECK-NEXT: [[ASHR1:%[0-9]+]]:_(s64) = G_ASHR [[SHL1]], [[C]](s64)
198 ; CHECK-NEXT: [[ICMP:%[0-9]+]]:_(s64) = G_ICMP intpred(slt), [[ASHR]](s64), [[ASHR1]]
199 ; CHECK-NEXT: $x10 = COPY [[ICMP]](s64)
200 ; CHECK-NEXT: PseudoRET implicit $x10
201 %0:_(s64) = COPY $x10
202 %1:_(s64) = COPY $x11
203 %2:_(s8) = G_TRUNC %0(s64)
204 %3:_(s8) = G_TRUNC %1(s64)
205 %4:_(s1) = G_ICMP intpred(slt), %2(s8), %3
206 %5:_(s64) = G_ANYEXT %4(s1)
208 PseudoRET implicit $x10
215 ; CHECK-LABEL: name: cmp_slt_i15
216 ; CHECK: [[COPY:%[0-9]+]]:_(s64) = COPY $x10
217 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:_(s64) = COPY $x11
218 ; CHECK-NEXT: [[C:%[0-9]+]]:_(s64) = G_CONSTANT i64 49
219 ; CHECK-NEXT: [[SHL:%[0-9]+]]:_(s64) = G_SHL [[COPY]], [[C]](s64)
220 ; CHECK-NEXT: [[ASHR:%[0-9]+]]:_(s64) = G_ASHR [[SHL]], [[C]](s64)
221 ; CHECK-NEXT: [[SHL1:%[0-9]+]]:_(s64) = G_SHL [[COPY1]], [[C]](s64)
222 ; CHECK-NEXT: [[ASHR1:%[0-9]+]]:_(s64) = G_ASHR [[SHL1]], [[C]](s64)
223 ; CHECK-NEXT: [[ICMP:%[0-9]+]]:_(s64) = G_ICMP intpred(slt), [[ASHR]](s64), [[ASHR1]]
224 ; CHECK-NEXT: $x10 = COPY [[ICMP]](s64)
225 ; CHECK-NEXT: PseudoRET implicit $x10
226 %0:_(s64) = COPY $x10
227 %1:_(s64) = COPY $x11
228 %2:_(s15) = G_TRUNC %0(s64)
229 %3:_(s15) = G_TRUNC %1(s64)
230 %4:_(s1) = G_ICMP intpred(slt), %2(s15), %3
231 %5:_(s64) = G_ANYEXT %4(s1)
233 PseudoRET implicit $x10
240 ; CHECK-LABEL: name: cmp_slt_i16
241 ; CHECK: [[COPY:%[0-9]+]]:_(s64) = COPY $x10
242 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:_(s64) = COPY $x11
243 ; CHECK-NEXT: [[C:%[0-9]+]]:_(s64) = G_CONSTANT i64 48
244 ; CHECK-NEXT: [[SHL:%[0-9]+]]:_(s64) = G_SHL [[COPY]], [[C]](s64)
245 ; CHECK-NEXT: [[ASHR:%[0-9]+]]:_(s64) = G_ASHR [[SHL]], [[C]](s64)
246 ; CHECK-NEXT: [[SHL1:%[0-9]+]]:_(s64) = G_SHL [[COPY1]], [[C]](s64)
247 ; CHECK-NEXT: [[ASHR1:%[0-9]+]]:_(s64) = G_ASHR [[SHL1]], [[C]](s64)
248 ; CHECK-NEXT: [[ICMP:%[0-9]+]]:_(s64) = G_ICMP intpred(slt), [[ASHR]](s64), [[ASHR1]]
249 ; CHECK-NEXT: $x10 = COPY [[ICMP]](s64)
250 ; CHECK-NEXT: PseudoRET implicit $x10
251 %0:_(s64) = COPY $x10
252 %1:_(s64) = COPY $x11
253 %2:_(s16) = G_TRUNC %0(s64)
254 %3:_(s16) = G_TRUNC %1(s64)
255 %4:_(s1) = G_ICMP intpred(slt), %2(s16), %3
256 %5:_(s64) = G_ANYEXT %4(s1)
258 PseudoRET implicit $x10
265 ; CHECK-LABEL: name: cmp_slt_i32
266 ; CHECK: [[COPY:%[0-9]+]]:_(s64) = COPY $x10
267 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:_(s64) = COPY $x11
268 ; CHECK-NEXT: [[SEXT_INREG:%[0-9]+]]:_(s64) = G_SEXT_INREG [[COPY]], 32
269 ; CHECK-NEXT: [[SEXT_INREG1:%[0-9]+]]:_(s64) = G_SEXT_INREG [[COPY1]], 32
270 ; CHECK-NEXT: [[ICMP:%[0-9]+]]:_(s64) = G_ICMP intpred(slt), [[SEXT_INREG]](s64), [[SEXT_INREG1]]
271 ; CHECK-NEXT: $x10 = COPY [[ICMP]](s64)
272 ; CHECK-NEXT: PseudoRET implicit $x10
273 %0:_(s64) = COPY $x10
274 %1:_(s64) = COPY $x11
275 %2:_(s32) = G_TRUNC %0(s64)
276 %3:_(s32) = G_TRUNC %1(s64)
277 %4:_(s1) = G_ICMP intpred(slt), %2(s32), %3
278 %5:_(s64) = G_ANYEXT %4(s1)
280 PseudoRET implicit $x10
287 ; CHECK-LABEL: name: cmp_slt_i64
288 ; CHECK: [[COPY:%[0-9]+]]:_(s64) = COPY $x10
289 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:_(s64) = COPY $x11
290 ; CHECK-NEXT: [[ICMP:%[0-9]+]]:_(s64) = G_ICMP intpred(slt), [[COPY]](s64), [[COPY1]]
291 ; CHECK-NEXT: $x10 = COPY [[ICMP]](s64)
292 ; CHECK-NEXT: PseudoRET implicit $x10
293 %0:_(s64) = COPY $x10
294 %1:_(s64) = COPY $x11
295 %2:_(s1) = G_ICMP intpred(slt), %0(s64), %1
296 %3:_(s64) = G_ANYEXT %2(s1)
298 PseudoRET implicit $x10
305 ; CHECK-LABEL: name: cmp_slt_i72
306 ; CHECK: %xhi:_(s64) = COPY $x10
307 ; CHECK-NEXT: %xlo:_(s64) = COPY $x11
308 ; CHECK-NEXT: %yhi:_(s64) = COPY $x12
309 ; CHECK-NEXT: %ylo:_(s64) = COPY $x13
310 ; CHECK-NEXT: [[C:%[0-9]+]]:_(s64) = G_CONSTANT i64 56
311 ; CHECK-NEXT: [[SHL:%[0-9]+]]:_(s64) = G_SHL %xlo, [[C]](s64)
312 ; CHECK-NEXT: [[ASHR:%[0-9]+]]:_(s64) = G_ASHR [[SHL]], [[C]](s64)
313 ; CHECK-NEXT: [[SHL1:%[0-9]+]]:_(s64) = G_SHL %ylo, [[C]](s64)
314 ; CHECK-NEXT: [[ASHR1:%[0-9]+]]:_(s64) = G_ASHR [[SHL1]], [[C]](s64)
315 ; CHECK-NEXT: [[ICMP:%[0-9]+]]:_(s64) = G_ICMP intpred(sge), [[ASHR]](s64), [[ASHR1]]
316 ; CHECK-NEXT: [[ICMP1:%[0-9]+]]:_(s64) = G_ICMP intpred(eq), [[ASHR]](s64), [[ASHR1]]
317 ; CHECK-NEXT: [[ICMP2:%[0-9]+]]:_(s64) = G_ICMP intpred(uge), %xhi(s64), %yhi
318 ; CHECK-NEXT: [[TRUNC:%[0-9]+]]:_(s32) = G_TRUNC [[ICMP2]](s64)
319 ; CHECK-NEXT: [[TRUNC1:%[0-9]+]]:_(s32) = G_TRUNC [[ICMP]](s64)
320 ; CHECK-NEXT: [[SELECT:%[0-9]+]]:_(s32) = G_SELECT [[ICMP1]](s64), [[TRUNC]], [[TRUNC1]]
321 ; CHECK-NEXT: %z0:_(s64) = G_ANYEXT [[SELECT]](s32)
322 ; CHECK-NEXT: $x10 = COPY %z0(s64)
323 ; CHECK-NEXT: PseudoRET implicit $x10
324 %xhi:_(s64) = COPY $x10
325 %xlo:_(s64) = COPY $x11
326 %yhi:_(s64) = COPY $x12
327 %ylo:_(s64) = COPY $x13
328 %x0:_(s128) = G_MERGE_VALUES %xhi(s64), %xlo(s64)
329 %y0:_(s128) = G_MERGE_VALUES %yhi(s64), %ylo(s64)
330 %x:_(s72) = G_TRUNC %x0(s128)
331 %y:_(s72) = G_TRUNC %y0(s128)
332 %z:_(s1) = G_ICMP intpred(sge), %x, %y
333 %z0:_(s64) = G_ANYEXT %z(s1)
335 PseudoRET implicit $x10
342 ; CHECK-LABEL: name: cmp_slt_i128
343 ; CHECK: %xhi:_(s64) = COPY $x10
344 ; CHECK-NEXT: %xlo:_(s64) = COPY $x11
345 ; CHECK-NEXT: %yhi:_(s64) = COPY $x12
346 ; CHECK-NEXT: %ylo:_(s64) = COPY $x13
347 ; CHECK-NEXT: [[ICMP:%[0-9]+]]:_(s64) = G_ICMP intpred(slt), %xlo(s64), %ylo
348 ; CHECK-NEXT: [[ICMP1:%[0-9]+]]:_(s64) = G_ICMP intpred(eq), %xlo(s64), %ylo
349 ; CHECK-NEXT: [[ICMP2:%[0-9]+]]:_(s64) = G_ICMP intpred(ult), %xhi(s64), %yhi
350 ; CHECK-NEXT: [[TRUNC:%[0-9]+]]:_(s32) = G_TRUNC [[ICMP2]](s64)
351 ; CHECK-NEXT: [[TRUNC1:%[0-9]+]]:_(s32) = G_TRUNC [[ICMP]](s64)
352 ; CHECK-NEXT: [[SELECT:%[0-9]+]]:_(s32) = G_SELECT [[ICMP1]](s64), [[TRUNC]], [[TRUNC1]]
353 ; CHECK-NEXT: %z0:_(s64) = G_ANYEXT [[SELECT]](s32)
354 ; CHECK-NEXT: $x10 = COPY %z0(s64)
355 ; CHECK-NEXT: PseudoRET implicit $x10
356 %xhi:_(s64) = COPY $x10
357 %xlo:_(s64) = COPY $x11
358 %yhi:_(s64) = COPY $x12
359 %ylo:_(s64) = COPY $x13
360 %x:_(s128) = G_MERGE_VALUES %xhi(s64), %xlo(s64)
361 %y:_(s128) = G_MERGE_VALUES %yhi(s64), %ylo(s64)
362 %z:_(s1) = G_ICMP intpred(slt), %x, %y
363 %z0:_(s64) = G_ANYEXT %z(s1)
365 PseudoRET implicit $x10
372 ; CHECK-LABEL: name: cmp_sge_i8
373 ; CHECK: [[COPY:%[0-9]+]]:_(s64) = COPY $x10
374 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:_(s64) = COPY $x11
375 ; CHECK-NEXT: [[C:%[0-9]+]]:_(s64) = G_CONSTANT i64 56
376 ; CHECK-NEXT: [[SHL:%[0-9]+]]:_(s64) = G_SHL [[COPY]], [[C]](s64)
377 ; CHECK-NEXT: [[ASHR:%[0-9]+]]:_(s64) = G_ASHR [[SHL]], [[C]](s64)
378 ; CHECK-NEXT: [[SHL1:%[0-9]+]]:_(s64) = G_SHL [[COPY1]], [[C]](s64)
379 ; CHECK-NEXT: [[ASHR1:%[0-9]+]]:_(s64) = G_ASHR [[SHL1]], [[C]](s64)
380 ; CHECK-NEXT: [[ICMP:%[0-9]+]]:_(s64) = G_ICMP intpred(sge), [[ASHR]](s64), [[ASHR1]]
381 ; CHECK-NEXT: $x10 = COPY [[ICMP]](s64)
382 ; CHECK-NEXT: PseudoRET implicit $x10
383 %0:_(s64) = COPY $x10
384 %1:_(s64) = COPY $x11
385 %2:_(s8) = G_TRUNC %0(s64)
386 %3:_(s8) = G_TRUNC %1(s64)
387 %4:_(s1) = G_ICMP intpred(sge), %2(s8), %3
388 %5:_(s64) = G_ANYEXT %4(s1)
390 PseudoRET implicit $x10
397 ; CHECK-LABEL: name: cmp_sge_i15
398 ; CHECK: [[COPY:%[0-9]+]]:_(s64) = COPY $x10
399 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:_(s64) = COPY $x11
400 ; CHECK-NEXT: [[C:%[0-9]+]]:_(s64) = G_CONSTANT i64 49
401 ; CHECK-NEXT: [[SHL:%[0-9]+]]:_(s64) = G_SHL [[COPY]], [[C]](s64)
402 ; CHECK-NEXT: [[ASHR:%[0-9]+]]:_(s64) = G_ASHR [[SHL]], [[C]](s64)
403 ; CHECK-NEXT: [[SHL1:%[0-9]+]]:_(s64) = G_SHL [[COPY1]], [[C]](s64)
404 ; CHECK-NEXT: [[ASHR1:%[0-9]+]]:_(s64) = G_ASHR [[SHL1]], [[C]](s64)
405 ; CHECK-NEXT: [[ICMP:%[0-9]+]]:_(s64) = G_ICMP intpred(sge), [[ASHR]](s64), [[ASHR1]]
406 ; CHECK-NEXT: $x10 = COPY [[ICMP]](s64)
407 ; CHECK-NEXT: PseudoRET implicit $x10
408 %0:_(s64) = COPY $x10
409 %1:_(s64) = COPY $x11
410 %2:_(s15) = G_TRUNC %0(s64)
411 %3:_(s15) = G_TRUNC %1(s64)
412 %4:_(s1) = G_ICMP intpred(sge), %2(s15), %3
413 %5:_(s64) = G_ANYEXT %4(s1)
415 PseudoRET implicit $x10
422 ; CHECK-LABEL: name: cmp_sge_i16
423 ; CHECK: [[COPY:%[0-9]+]]:_(s64) = COPY $x10
424 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:_(s64) = COPY $x11
425 ; CHECK-NEXT: [[C:%[0-9]+]]:_(s64) = G_CONSTANT i64 48
426 ; CHECK-NEXT: [[SHL:%[0-9]+]]:_(s64) = G_SHL [[COPY]], [[C]](s64)
427 ; CHECK-NEXT: [[ASHR:%[0-9]+]]:_(s64) = G_ASHR [[SHL]], [[C]](s64)
428 ; CHECK-NEXT: [[SHL1:%[0-9]+]]:_(s64) = G_SHL [[COPY1]], [[C]](s64)
429 ; CHECK-NEXT: [[ASHR1:%[0-9]+]]:_(s64) = G_ASHR [[SHL1]], [[C]](s64)
430 ; CHECK-NEXT: [[ICMP:%[0-9]+]]:_(s64) = G_ICMP intpred(sge), [[ASHR]](s64), [[ASHR1]]
431 ; CHECK-NEXT: $x10 = COPY [[ICMP]](s64)
432 ; CHECK-NEXT: PseudoRET implicit $x10
433 %0:_(s64) = COPY $x10
434 %1:_(s64) = COPY $x11
435 %2:_(s16) = G_TRUNC %0(s64)
436 %3:_(s16) = G_TRUNC %1(s64)
437 %4:_(s1) = G_ICMP intpred(sge), %2(s16), %3
438 %5:_(s64) = G_ANYEXT %4(s1)
440 PseudoRET implicit $x10
447 ; CHECK-LABEL: name: cmp_sge_i32
448 ; CHECK: [[COPY:%[0-9]+]]:_(s64) = COPY $x10
449 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:_(s64) = COPY $x11
450 ; CHECK-NEXT: [[SEXT_INREG:%[0-9]+]]:_(s64) = G_SEXT_INREG [[COPY]], 32
451 ; CHECK-NEXT: [[SEXT_INREG1:%[0-9]+]]:_(s64) = G_SEXT_INREG [[COPY1]], 32
452 ; CHECK-NEXT: [[ICMP:%[0-9]+]]:_(s64) = G_ICMP intpred(sge), [[SEXT_INREG]](s64), [[SEXT_INREG1]]
453 ; CHECK-NEXT: $x10 = COPY [[ICMP]](s64)
454 ; CHECK-NEXT: PseudoRET implicit $x10
455 %0:_(s64) = COPY $x10
456 %1:_(s64) = COPY $x11
457 %2:_(s32) = G_TRUNC %0(s64)
458 %3:_(s32) = G_TRUNC %1(s64)
459 %4:_(s1) = G_ICMP intpred(sge), %2(s32), %3
460 %5:_(s64) = G_ANYEXT %4(s1)
462 PseudoRET implicit $x10
469 ; CHECK-LABEL: name: cmp_sge_i64
470 ; CHECK: [[COPY:%[0-9]+]]:_(s64) = COPY $x10
471 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:_(s64) = COPY $x11
472 ; CHECK-NEXT: [[ICMP:%[0-9]+]]:_(s64) = G_ICMP intpred(sge), [[COPY]](s64), [[COPY1]]
473 ; CHECK-NEXT: $x10 = COPY [[ICMP]](s64)
474 ; CHECK-NEXT: PseudoRET implicit $x10
475 %0:_(s64) = COPY $x10
476 %1:_(s64) = COPY $x11
477 %2:_(s1) = G_ICMP intpred(sge), %0(s64), %1
478 %3:_(s64) = G_ANYEXT %2(s1)
480 PseudoRET implicit $x10
487 ; CHECK-LABEL: name: cmp_sge_i72
488 ; CHECK: %xhi:_(s64) = COPY $x10
489 ; CHECK-NEXT: %xlo:_(s64) = COPY $x11
490 ; CHECK-NEXT: %yhi:_(s64) = COPY $x12
491 ; CHECK-NEXT: %ylo:_(s64) = COPY $x13
492 ; CHECK-NEXT: [[C:%[0-9]+]]:_(s64) = G_CONSTANT i64 56
493 ; CHECK-NEXT: [[SHL:%[0-9]+]]:_(s64) = G_SHL %xlo, [[C]](s64)
494 ; CHECK-NEXT: [[ASHR:%[0-9]+]]:_(s64) = G_ASHR [[SHL]], [[C]](s64)
495 ; CHECK-NEXT: [[SHL1:%[0-9]+]]:_(s64) = G_SHL %ylo, [[C]](s64)
496 ; CHECK-NEXT: [[ASHR1:%[0-9]+]]:_(s64) = G_ASHR [[SHL1]], [[C]](s64)
497 ; CHECK-NEXT: [[ICMP:%[0-9]+]]:_(s64) = G_ICMP intpred(sge), [[ASHR]](s64), [[ASHR1]]
498 ; CHECK-NEXT: [[ICMP1:%[0-9]+]]:_(s64) = G_ICMP intpred(eq), [[ASHR]](s64), [[ASHR1]]
499 ; CHECK-NEXT: [[ICMP2:%[0-9]+]]:_(s64) = G_ICMP intpred(uge), %xhi(s64), %yhi
500 ; CHECK-NEXT: [[TRUNC:%[0-9]+]]:_(s32) = G_TRUNC [[ICMP2]](s64)
501 ; CHECK-NEXT: [[TRUNC1:%[0-9]+]]:_(s32) = G_TRUNC [[ICMP]](s64)
502 ; CHECK-NEXT: [[SELECT:%[0-9]+]]:_(s32) = G_SELECT [[ICMP1]](s64), [[TRUNC]], [[TRUNC1]]
503 ; CHECK-NEXT: %z0:_(s64) = G_ANYEXT [[SELECT]](s32)
504 ; CHECK-NEXT: $x10 = COPY %z0(s64)
505 ; CHECK-NEXT: PseudoRET implicit $x10
506 %xhi:_(s64) = COPY $x10
507 %xlo:_(s64) = COPY $x11
508 %yhi:_(s64) = COPY $x12
509 %ylo:_(s64) = COPY $x13
510 %x0:_(s128) = G_MERGE_VALUES %xhi(s64), %xlo(s64)
511 %y0:_(s128) = G_MERGE_VALUES %yhi(s64), %ylo(s64)
512 %x:_(s72) = G_TRUNC %x0(s128)
513 %y:_(s72) = G_TRUNC %y0(s128)
514 %z:_(s1) = G_ICMP intpred(sge), %x, %y
515 %z0:_(s64) = G_ANYEXT %z(s1)
517 PseudoRET implicit $x10
524 ; CHECK-LABEL: name: cmp_sge_i128
525 ; CHECK: %xhi:_(s64) = COPY $x10
526 ; CHECK-NEXT: %xlo:_(s64) = COPY $x11
527 ; CHECK-NEXT: %yhi:_(s64) = COPY $x12
528 ; CHECK-NEXT: %ylo:_(s64) = COPY $x13
529 ; CHECK-NEXT: [[ICMP:%[0-9]+]]:_(s64) = G_ICMP intpred(sge), %xlo(s64), %ylo
530 ; CHECK-NEXT: [[ICMP1:%[0-9]+]]:_(s64) = G_ICMP intpred(eq), %xlo(s64), %ylo
531 ; CHECK-NEXT: [[ICMP2:%[0-9]+]]:_(s64) = G_ICMP intpred(uge), %xhi(s64), %yhi
532 ; CHECK-NEXT: [[TRUNC:%[0-9]+]]:_(s32) = G_TRUNC [[ICMP2]](s64)
533 ; CHECK-NEXT: [[TRUNC1:%[0-9]+]]:_(s32) = G_TRUNC [[ICMP]](s64)
534 ; CHECK-NEXT: [[SELECT:%[0-9]+]]:_(s32) = G_SELECT [[ICMP1]](s64), [[TRUNC]], [[TRUNC1]]
535 ; CHECK-NEXT: %z0:_(s64) = G_ANYEXT [[SELECT]](s32)
536 ; CHECK-NEXT: $x10 = COPY %z0(s64)
537 ; CHECK-NEXT: PseudoRET implicit $x10
538 %xhi:_(s64) = COPY $x10
539 %xlo:_(s64) = COPY $x11
540 %yhi:_(s64) = COPY $x12
541 %ylo:_(s64) = COPY $x13
542 %x:_(s128) = G_MERGE_VALUES %xhi(s64), %xlo(s64)
543 %y:_(s128) = G_MERGE_VALUES %yhi(s64), %ylo(s64)
544 %z:_(s1) = G_ICMP intpred(sge), %x, %y
545 %z0:_(s64) = G_ANYEXT %z(s1)
547 PseudoRET implicit $x10
554 ; CHECK-LABEL: name: cmp_sle_i8
555 ; CHECK: [[COPY:%[0-9]+]]:_(s64) = COPY $x10
556 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:_(s64) = COPY $x11
557 ; CHECK-NEXT: [[C:%[0-9]+]]:_(s64) = G_CONSTANT i64 56
558 ; CHECK-NEXT: [[SHL:%[0-9]+]]:_(s64) = G_SHL [[COPY]], [[C]](s64)
559 ; CHECK-NEXT: [[ASHR:%[0-9]+]]:_(s64) = G_ASHR [[SHL]], [[C]](s64)
560 ; CHECK-NEXT: [[SHL1:%[0-9]+]]:_(s64) = G_SHL [[COPY1]], [[C]](s64)
561 ; CHECK-NEXT: [[ASHR1:%[0-9]+]]:_(s64) = G_ASHR [[SHL1]], [[C]](s64)
562 ; CHECK-NEXT: [[ICMP:%[0-9]+]]:_(s64) = G_ICMP intpred(sle), [[ASHR]](s64), [[ASHR1]]
563 ; CHECK-NEXT: $x10 = COPY [[ICMP]](s64)
564 ; CHECK-NEXT: PseudoRET implicit $x10
565 %0:_(s64) = COPY $x10
566 %1:_(s64) = COPY $x11
567 %2:_(s8) = G_TRUNC %0(s64)
568 %3:_(s8) = G_TRUNC %1(s64)
569 %4:_(s1) = G_ICMP intpred(sle), %2(s8), %3
570 %5:_(s64) = G_ANYEXT %4(s1)
572 PseudoRET implicit $x10
579 ; CHECK-LABEL: name: cmp_sle_i15
580 ; CHECK: [[COPY:%[0-9]+]]:_(s64) = COPY $x10
581 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:_(s64) = COPY $x11
582 ; CHECK-NEXT: [[C:%[0-9]+]]:_(s64) = G_CONSTANT i64 49
583 ; CHECK-NEXT: [[SHL:%[0-9]+]]:_(s64) = G_SHL [[COPY]], [[C]](s64)
584 ; CHECK-NEXT: [[ASHR:%[0-9]+]]:_(s64) = G_ASHR [[SHL]], [[C]](s64)
585 ; CHECK-NEXT: [[SHL1:%[0-9]+]]:_(s64) = G_SHL [[COPY1]], [[C]](s64)
586 ; CHECK-NEXT: [[ASHR1:%[0-9]+]]:_(s64) = G_ASHR [[SHL1]], [[C]](s64)
587 ; CHECK-NEXT: [[ICMP:%[0-9]+]]:_(s64) = G_ICMP intpred(sle), [[ASHR]](s64), [[ASHR1]]
588 ; CHECK-NEXT: $x10 = COPY [[ICMP]](s64)
589 ; CHECK-NEXT: PseudoRET implicit $x10
590 %0:_(s64) = COPY $x10
591 %1:_(s64) = COPY $x11
592 %2:_(s15) = G_TRUNC %0(s64)
593 %3:_(s15) = G_TRUNC %1(s64)
594 %4:_(s1) = G_ICMP intpred(sle), %2(s15), %3
595 %5:_(s64) = G_ANYEXT %4(s1)
597 PseudoRET implicit $x10
604 ; CHECK-LABEL: name: cmp_sle_i16
605 ; CHECK: [[COPY:%[0-9]+]]:_(s64) = COPY $x10
606 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:_(s64) = COPY $x11
607 ; CHECK-NEXT: [[C:%[0-9]+]]:_(s64) = G_CONSTANT i64 48
608 ; CHECK-NEXT: [[SHL:%[0-9]+]]:_(s64) = G_SHL [[COPY]], [[C]](s64)
609 ; CHECK-NEXT: [[ASHR:%[0-9]+]]:_(s64) = G_ASHR [[SHL]], [[C]](s64)
610 ; CHECK-NEXT: [[SHL1:%[0-9]+]]:_(s64) = G_SHL [[COPY1]], [[C]](s64)
611 ; CHECK-NEXT: [[ASHR1:%[0-9]+]]:_(s64) = G_ASHR [[SHL1]], [[C]](s64)
612 ; CHECK-NEXT: [[ICMP:%[0-9]+]]:_(s64) = G_ICMP intpred(sle), [[ASHR]](s64), [[ASHR1]]
613 ; CHECK-NEXT: $x10 = COPY [[ICMP]](s64)
614 ; CHECK-NEXT: PseudoRET implicit $x10
615 %0:_(s64) = COPY $x10
616 %1:_(s64) = COPY $x11
617 %2:_(s16) = G_TRUNC %0(s64)
618 %3:_(s16) = G_TRUNC %1(s64)
619 %4:_(s1) = G_ICMP intpred(sle), %2(s16), %3
620 %5:_(s64) = G_ANYEXT %4(s1)
622 PseudoRET implicit $x10
629 ; CHECK-LABEL: name: cmp_sle_i32
630 ; CHECK: [[COPY:%[0-9]+]]:_(s64) = COPY $x10
631 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:_(s64) = COPY $x11
632 ; CHECK-NEXT: [[SEXT_INREG:%[0-9]+]]:_(s64) = G_SEXT_INREG [[COPY]], 32
633 ; CHECK-NEXT: [[SEXT_INREG1:%[0-9]+]]:_(s64) = G_SEXT_INREG [[COPY1]], 32
634 ; CHECK-NEXT: [[ICMP:%[0-9]+]]:_(s64) = G_ICMP intpred(sle), [[SEXT_INREG]](s64), [[SEXT_INREG1]]
635 ; CHECK-NEXT: $x10 = COPY [[ICMP]](s64)
636 ; CHECK-NEXT: PseudoRET implicit $x10
637 %0:_(s64) = COPY $x10
638 %1:_(s64) = COPY $x11
639 %2:_(s32) = G_TRUNC %0(s64)
640 %3:_(s32) = G_TRUNC %1(s64)
641 %4:_(s1) = G_ICMP intpred(sle), %2(s32), %3
642 %5:_(s64) = G_ANYEXT %4(s1)
644 PseudoRET implicit $x10
651 ; CHECK-LABEL: name: cmp_sle_i64
652 ; CHECK: [[COPY:%[0-9]+]]:_(s64) = COPY $x10
653 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:_(s64) = COPY $x11
654 ; CHECK-NEXT: [[ICMP:%[0-9]+]]:_(s64) = G_ICMP intpred(sle), [[COPY]](s64), [[COPY1]]
655 ; CHECK-NEXT: $x10 = COPY [[ICMP]](s64)
656 ; CHECK-NEXT: PseudoRET implicit $x10
657 %0:_(s64) = COPY $x10
658 %1:_(s64) = COPY $x11
659 %2:_(s1) = G_ICMP intpred(sle), %0(s64), %1
660 %3:_(s64) = G_ANYEXT %2(s1)
662 PseudoRET implicit $x10
669 ; CHECK-LABEL: name: cmp_sle_i72
670 ; CHECK: %xhi:_(s64) = COPY $x10
671 ; CHECK-NEXT: %xlo:_(s64) = COPY $x11
672 ; CHECK-NEXT: %yhi:_(s64) = COPY $x12
673 ; CHECK-NEXT: %ylo:_(s64) = COPY $x13
674 ; CHECK-NEXT: [[C:%[0-9]+]]:_(s64) = G_CONSTANT i64 56
675 ; CHECK-NEXT: [[SHL:%[0-9]+]]:_(s64) = G_SHL %xlo, [[C]](s64)
676 ; CHECK-NEXT: [[ASHR:%[0-9]+]]:_(s64) = G_ASHR [[SHL]], [[C]](s64)
677 ; CHECK-NEXT: [[SHL1:%[0-9]+]]:_(s64) = G_SHL %ylo, [[C]](s64)
678 ; CHECK-NEXT: [[ASHR1:%[0-9]+]]:_(s64) = G_ASHR [[SHL1]], [[C]](s64)
679 ; CHECK-NEXT: [[ICMP:%[0-9]+]]:_(s64) = G_ICMP intpred(sle), [[ASHR]](s64), [[ASHR1]]
680 ; CHECK-NEXT: [[ICMP1:%[0-9]+]]:_(s64) = G_ICMP intpred(eq), [[ASHR]](s64), [[ASHR1]]
681 ; CHECK-NEXT: [[ICMP2:%[0-9]+]]:_(s64) = G_ICMP intpred(ule), %xhi(s64), %yhi
682 ; CHECK-NEXT: [[TRUNC:%[0-9]+]]:_(s32) = G_TRUNC [[ICMP2]](s64)
683 ; CHECK-NEXT: [[TRUNC1:%[0-9]+]]:_(s32) = G_TRUNC [[ICMP]](s64)
684 ; CHECK-NEXT: [[SELECT:%[0-9]+]]:_(s32) = G_SELECT [[ICMP1]](s64), [[TRUNC]], [[TRUNC1]]
685 ; CHECK-NEXT: %z0:_(s64) = G_ANYEXT [[SELECT]](s32)
686 ; CHECK-NEXT: $x10 = COPY %z0(s64)
687 ; CHECK-NEXT: PseudoRET implicit $x10
688 %xhi:_(s64) = COPY $x10
689 %xlo:_(s64) = COPY $x11
690 %yhi:_(s64) = COPY $x12
691 %ylo:_(s64) = COPY $x13
692 %x0:_(s128) = G_MERGE_VALUES %xhi(s64), %xlo(s64)
693 %y0:_(s128) = G_MERGE_VALUES %yhi(s64), %ylo(s64)
694 %x:_(s72) = G_TRUNC %x0(s128)
695 %y:_(s72) = G_TRUNC %y0(s128)
696 %z:_(s1) = G_ICMP intpred(sle), %x, %y
697 %z0:_(s64) = G_ANYEXT %z(s1)
699 PseudoRET implicit $x10
706 ; CHECK-LABEL: name: cmp_sle_i128
707 ; CHECK: %xhi:_(s64) = COPY $x10
708 ; CHECK-NEXT: %xlo:_(s64) = COPY $x11
709 ; CHECK-NEXT: %yhi:_(s64) = COPY $x12
710 ; CHECK-NEXT: %ylo:_(s64) = COPY $x13
711 ; CHECK-NEXT: [[ICMP:%[0-9]+]]:_(s64) = G_ICMP intpred(sle), %xlo(s64), %ylo
712 ; CHECK-NEXT: [[ICMP1:%[0-9]+]]:_(s64) = G_ICMP intpred(eq), %xlo(s64), %ylo
713 ; CHECK-NEXT: [[ICMP2:%[0-9]+]]:_(s64) = G_ICMP intpred(ule), %xhi(s64), %yhi
714 ; CHECK-NEXT: [[TRUNC:%[0-9]+]]:_(s32) = G_TRUNC [[ICMP2]](s64)
715 ; CHECK-NEXT: [[TRUNC1:%[0-9]+]]:_(s32) = G_TRUNC [[ICMP]](s64)
716 ; CHECK-NEXT: [[SELECT:%[0-9]+]]:_(s32) = G_SELECT [[ICMP1]](s64), [[TRUNC]], [[TRUNC1]]
717 ; CHECK-NEXT: %z0:_(s64) = G_ANYEXT [[SELECT]](s32)
718 ; CHECK-NEXT: $x10 = COPY %z0(s64)
719 ; CHECK-NEXT: PseudoRET implicit $x10
720 %xhi:_(s64) = COPY $x10
721 %xlo:_(s64) = COPY $x11
722 %yhi:_(s64) = COPY $x12
723 %ylo:_(s64) = COPY $x13
724 %x:_(s128) = G_MERGE_VALUES %xhi(s64), %xlo(s64)
725 %y:_(s128) = G_MERGE_VALUES %yhi(s64), %ylo(s64)
726 %z:_(s1) = G_ICMP intpred(sle), %x, %y
727 %z0:_(s64) = G_ANYEXT %z(s1)
729 PseudoRET implicit $x10
736 ; CHECK-LABEL: name: cmp_ugt_i8
737 ; CHECK: [[COPY:%[0-9]+]]:_(s64) = COPY $x10
738 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:_(s64) = COPY $x11
739 ; CHECK-NEXT: [[C:%[0-9]+]]:_(s64) = G_CONSTANT i64 255
740 ; CHECK-NEXT: [[AND:%[0-9]+]]:_(s64) = G_AND [[COPY]], [[C]]
741 ; CHECK-NEXT: [[AND1:%[0-9]+]]:_(s64) = G_AND [[COPY1]], [[C]]
742 ; CHECK-NEXT: [[ICMP:%[0-9]+]]:_(s64) = G_ICMP intpred(ugt), [[AND]](s64), [[AND1]]
743 ; CHECK-NEXT: $x10 = COPY [[ICMP]](s64)
744 ; CHECK-NEXT: PseudoRET implicit $x10
745 %0:_(s64) = COPY $x10
746 %1:_(s64) = COPY $x11
747 %2:_(s8) = G_TRUNC %0(s64)
748 %3:_(s8) = G_TRUNC %1(s64)
749 %4:_(s1) = G_ICMP intpred(ugt), %2(s8), %3
750 %5:_(s64) = G_ANYEXT %4(s1)
752 PseudoRET implicit $x10
759 ; CHECK-LABEL: name: cmp_ugt_i15
760 ; CHECK: [[COPY:%[0-9]+]]:_(s64) = COPY $x10
761 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:_(s64) = COPY $x11
762 ; CHECK-NEXT: [[C:%[0-9]+]]:_(s64) = G_CONSTANT i64 32767
763 ; CHECK-NEXT: [[AND:%[0-9]+]]:_(s64) = G_AND [[COPY]], [[C]]
764 ; CHECK-NEXT: [[AND1:%[0-9]+]]:_(s64) = G_AND [[COPY1]], [[C]]
765 ; CHECK-NEXT: [[ICMP:%[0-9]+]]:_(s64) = G_ICMP intpred(ugt), [[AND]](s64), [[AND1]]
766 ; CHECK-NEXT: $x10 = COPY [[ICMP]](s64)
767 ; CHECK-NEXT: PseudoRET implicit $x10
768 %0:_(s64) = COPY $x10
769 %1:_(s64) = COPY $x11
770 %2:_(s15) = G_TRUNC %0(s64)
771 %3:_(s15) = G_TRUNC %1(s64)
772 %4:_(s1) = G_ICMP intpred(ugt), %2(s15), %3
773 %5:_(s64) = G_ANYEXT %4(s1)
775 PseudoRET implicit $x10
782 ; CHECK-LABEL: name: cmp_ugt_i16
783 ; CHECK: [[COPY:%[0-9]+]]:_(s64) = COPY $x10
784 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:_(s64) = COPY $x11
785 ; CHECK-NEXT: [[C:%[0-9]+]]:_(s64) = G_CONSTANT i64 65535
786 ; CHECK-NEXT: [[AND:%[0-9]+]]:_(s64) = G_AND [[COPY]], [[C]]
787 ; CHECK-NEXT: [[AND1:%[0-9]+]]:_(s64) = G_AND [[COPY1]], [[C]]
788 ; CHECK-NEXT: [[ICMP:%[0-9]+]]:_(s64) = G_ICMP intpred(ugt), [[AND]](s64), [[AND1]]
789 ; CHECK-NEXT: $x10 = COPY [[ICMP]](s64)
790 ; CHECK-NEXT: PseudoRET implicit $x10
791 %0:_(s64) = COPY $x10
792 %1:_(s64) = COPY $x11
793 %2:_(s16) = G_TRUNC %0(s64)
794 %3:_(s16) = G_TRUNC %1(s64)
795 %4:_(s1) = G_ICMP intpred(ugt), %2(s16), %3
796 %5:_(s64) = G_ANYEXT %4(s1)
798 PseudoRET implicit $x10
805 ; CHECK-LABEL: name: cmp_ugt_i32
806 ; CHECK: [[COPY:%[0-9]+]]:_(s64) = COPY $x10
807 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:_(s64) = COPY $x11
808 ; CHECK-NEXT: [[C:%[0-9]+]]:_(s64) = G_CONSTANT i64 4294967295
809 ; CHECK-NEXT: [[AND:%[0-9]+]]:_(s64) = G_AND [[COPY]], [[C]]
810 ; CHECK-NEXT: [[AND1:%[0-9]+]]:_(s64) = G_AND [[COPY1]], [[C]]
811 ; CHECK-NEXT: [[ICMP:%[0-9]+]]:_(s64) = G_ICMP intpred(ugt), [[AND]](s64), [[AND1]]
812 ; CHECK-NEXT: $x10 = COPY [[ICMP]](s64)
813 ; CHECK-NEXT: PseudoRET implicit $x10
814 %0:_(s64) = COPY $x10
815 %1:_(s64) = COPY $x11
816 %2:_(s32) = G_TRUNC %0(s64)
817 %3:_(s32) = G_TRUNC %1(s64)
818 %4:_(s1) = G_ICMP intpred(ugt), %2(s32), %3
819 %5:_(s64) = G_ANYEXT %4(s1)
821 PseudoRET implicit $x10
828 ; CHECK-LABEL: name: cmp_ugt_i64
829 ; CHECK: [[COPY:%[0-9]+]]:_(s64) = COPY $x10
830 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:_(s64) = COPY $x11
831 ; CHECK-NEXT: [[ICMP:%[0-9]+]]:_(s64) = G_ICMP intpred(ugt), [[COPY]](s64), [[COPY1]]
832 ; CHECK-NEXT: $x10 = COPY [[ICMP]](s64)
833 ; CHECK-NEXT: PseudoRET implicit $x10
834 %0:_(s64) = COPY $x10
835 %1:_(s64) = COPY $x11
836 %2:_(s1) = G_ICMP intpred(ugt), %0(s64), %1
837 %3:_(s64) = G_ANYEXT %2(s1)
839 PseudoRET implicit $x10
846 ; CHECK-LABEL: name: cmp_ugt_i72
847 ; CHECK: %xhi:_(s64) = COPY $x10
848 ; CHECK-NEXT: %xlo:_(s64) = COPY $x11
849 ; CHECK-NEXT: %yhi:_(s64) = COPY $x12
850 ; CHECK-NEXT: %ylo:_(s64) = COPY $x13
851 ; CHECK-NEXT: [[C:%[0-9]+]]:_(s64) = G_CONSTANT i64 -1
852 ; CHECK-NEXT: [[C1:%[0-9]+]]:_(s64) = G_CONSTANT i64 255
853 ; CHECK-NEXT: [[AND:%[0-9]+]]:_(s64) = G_AND %xhi, [[C]]
854 ; CHECK-NEXT: [[AND1:%[0-9]+]]:_(s64) = G_AND %xlo, [[C1]]
855 ; CHECK-NEXT: [[AND2:%[0-9]+]]:_(s64) = G_AND %yhi, [[C]]
856 ; CHECK-NEXT: [[AND3:%[0-9]+]]:_(s64) = G_AND %ylo, [[C1]]
857 ; CHECK-NEXT: [[ICMP:%[0-9]+]]:_(s64) = G_ICMP intpred(ugt), [[AND1]](s64), [[AND3]]
858 ; CHECK-NEXT: [[ICMP1:%[0-9]+]]:_(s64) = G_ICMP intpred(eq), [[AND1]](s64), [[AND3]]
859 ; CHECK-NEXT: [[ICMP2:%[0-9]+]]:_(s64) = G_ICMP intpred(ugt), [[AND]](s64), [[AND2]]
860 ; CHECK-NEXT: [[TRUNC:%[0-9]+]]:_(s32) = G_TRUNC [[ICMP2]](s64)
861 ; CHECK-NEXT: [[TRUNC1:%[0-9]+]]:_(s32) = G_TRUNC [[ICMP]](s64)
862 ; CHECK-NEXT: [[SELECT:%[0-9]+]]:_(s32) = G_SELECT [[ICMP1]](s64), [[TRUNC]], [[TRUNC1]]
863 ; CHECK-NEXT: %z0:_(s64) = G_ANYEXT [[SELECT]](s32)
864 ; CHECK-NEXT: $x10 = COPY %z0(s64)
865 ; CHECK-NEXT: PseudoRET implicit $x10
866 %xhi:_(s64) = COPY $x10
867 %xlo:_(s64) = COPY $x11
868 %yhi:_(s64) = COPY $x12
869 %ylo:_(s64) = COPY $x13
870 %x0:_(s128) = G_MERGE_VALUES %xhi(s64), %xlo(s64)
871 %y0:_(s128) = G_MERGE_VALUES %yhi(s64), %ylo(s64)
872 %x:_(s72) = G_TRUNC %x0(s128)
873 %y:_(s72) = G_TRUNC %y0(s128)
874 %z:_(s1) = G_ICMP intpred(ugt), %x, %y
875 %z0:_(s64) = G_ANYEXT %z(s1)
877 PseudoRET implicit $x10
884 ; CHECK-LABEL: name: cmp_ugt_i128
885 ; CHECK: %xhi:_(s64) = COPY $x10
886 ; CHECK-NEXT: %xlo:_(s64) = COPY $x11
887 ; CHECK-NEXT: %yhi:_(s64) = COPY $x12
888 ; CHECK-NEXT: %ylo:_(s64) = COPY $x13
889 ; CHECK-NEXT: [[ICMP:%[0-9]+]]:_(s64) = G_ICMP intpred(ugt), %xlo(s64), %ylo
890 ; CHECK-NEXT: [[ICMP1:%[0-9]+]]:_(s64) = G_ICMP intpred(eq), %xlo(s64), %ylo
891 ; CHECK-NEXT: [[ICMP2:%[0-9]+]]:_(s64) = G_ICMP intpred(ugt), %xhi(s64), %yhi
892 ; CHECK-NEXT: [[TRUNC:%[0-9]+]]:_(s32) = G_TRUNC [[ICMP2]](s64)
893 ; CHECK-NEXT: [[TRUNC1:%[0-9]+]]:_(s32) = G_TRUNC [[ICMP]](s64)
894 ; CHECK-NEXT: [[SELECT:%[0-9]+]]:_(s32) = G_SELECT [[ICMP1]](s64), [[TRUNC]], [[TRUNC1]]
895 ; CHECK-NEXT: %z0:_(s64) = G_ANYEXT [[SELECT]](s32)
896 ; CHECK-NEXT: $x10 = COPY %z0(s64)
897 ; CHECK-NEXT: PseudoRET implicit $x10
898 %xhi:_(s64) = COPY $x10
899 %xlo:_(s64) = COPY $x11
900 %yhi:_(s64) = COPY $x12
901 %ylo:_(s64) = COPY $x13
902 %x:_(s128) = G_MERGE_VALUES %xhi(s64), %xlo(s64)
903 %y:_(s128) = G_MERGE_VALUES %yhi(s64), %ylo(s64)
904 %z:_(s1) = G_ICMP intpred(ugt), %x, %y
905 %z0:_(s64) = G_ANYEXT %z(s1)
907 PseudoRET implicit $x10
914 ; CHECK-LABEL: name: cmp_ult_i8
915 ; CHECK: [[COPY:%[0-9]+]]:_(s64) = COPY $x10
916 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:_(s64) = COPY $x11
917 ; CHECK-NEXT: [[C:%[0-9]+]]:_(s64) = G_CONSTANT i64 255
918 ; CHECK-NEXT: [[AND:%[0-9]+]]:_(s64) = G_AND [[COPY]], [[C]]
919 ; CHECK-NEXT: [[AND1:%[0-9]+]]:_(s64) = G_AND [[COPY1]], [[C]]
920 ; CHECK-NEXT: [[ICMP:%[0-9]+]]:_(s64) = G_ICMP intpred(ult), [[AND]](s64), [[AND1]]
921 ; CHECK-NEXT: $x10 = COPY [[ICMP]](s64)
922 ; CHECK-NEXT: PseudoRET implicit $x10
923 %0:_(s64) = COPY $x10
924 %1:_(s64) = COPY $x11
925 %2:_(s8) = G_TRUNC %0(s64)
926 %3:_(s8) = G_TRUNC %1(s64)
927 %4:_(s1) = G_ICMP intpred(ult), %2(s8), %3
928 %5:_(s64) = G_ANYEXT %4(s1)
930 PseudoRET implicit $x10
937 ; CHECK-LABEL: name: cmp_ult_i15
938 ; CHECK: [[COPY:%[0-9]+]]:_(s64) = COPY $x10
939 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:_(s64) = COPY $x11
940 ; CHECK-NEXT: [[C:%[0-9]+]]:_(s64) = G_CONSTANT i64 32767
941 ; CHECK-NEXT: [[AND:%[0-9]+]]:_(s64) = G_AND [[COPY]], [[C]]
942 ; CHECK-NEXT: [[AND1:%[0-9]+]]:_(s64) = G_AND [[COPY1]], [[C]]
943 ; CHECK-NEXT: [[ICMP:%[0-9]+]]:_(s64) = G_ICMP intpred(ult), [[AND]](s64), [[AND1]]
944 ; CHECK-NEXT: $x10 = COPY [[ICMP]](s64)
945 ; CHECK-NEXT: PseudoRET implicit $x10
946 %0:_(s64) = COPY $x10
947 %1:_(s64) = COPY $x11
948 %2:_(s15) = G_TRUNC %0(s64)
949 %3:_(s15) = G_TRUNC %1(s64)
950 %4:_(s1) = G_ICMP intpred(ult), %2(s15), %3
951 %5:_(s64) = G_ANYEXT %4(s1)
953 PseudoRET implicit $x10
960 ; CHECK-LABEL: name: cmp_ult_i16
961 ; CHECK: [[COPY:%[0-9]+]]:_(s64) = COPY $x10
962 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:_(s64) = COPY $x11
963 ; CHECK-NEXT: [[C:%[0-9]+]]:_(s64) = G_CONSTANT i64 65535
964 ; CHECK-NEXT: [[AND:%[0-9]+]]:_(s64) = G_AND [[COPY]], [[C]]
965 ; CHECK-NEXT: [[AND1:%[0-9]+]]:_(s64) = G_AND [[COPY1]], [[C]]
966 ; CHECK-NEXT: [[ICMP:%[0-9]+]]:_(s64) = G_ICMP intpred(ult), [[AND]](s64), [[AND1]]
967 ; CHECK-NEXT: $x10 = COPY [[ICMP]](s64)
968 ; CHECK-NEXT: PseudoRET implicit $x10
969 %0:_(s64) = COPY $x10
970 %1:_(s64) = COPY $x11
971 %2:_(s16) = G_TRUNC %0(s64)
972 %3:_(s16) = G_TRUNC %1(s64)
973 %4:_(s1) = G_ICMP intpred(ult), %2(s16), %3
974 %5:_(s64) = G_ANYEXT %4(s1)
976 PseudoRET implicit $x10
983 ; CHECK-LABEL: name: cmp_ult_i32
984 ; CHECK: [[COPY:%[0-9]+]]:_(s64) = COPY $x10
985 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:_(s64) = COPY $x11
986 ; CHECK-NEXT: [[C:%[0-9]+]]:_(s64) = G_CONSTANT i64 4294967295
987 ; CHECK-NEXT: [[AND:%[0-9]+]]:_(s64) = G_AND [[COPY]], [[C]]
988 ; CHECK-NEXT: [[AND1:%[0-9]+]]:_(s64) = G_AND [[COPY1]], [[C]]
989 ; CHECK-NEXT: [[ICMP:%[0-9]+]]:_(s64) = G_ICMP intpred(ult), [[AND]](s64), [[AND1]]
990 ; CHECK-NEXT: $x10 = COPY [[ICMP]](s64)
991 ; CHECK-NEXT: PseudoRET implicit $x10
992 %0:_(s64) = COPY $x10
993 %1:_(s64) = COPY $x11
994 %2:_(s32) = G_TRUNC %0(s64)
995 %3:_(s32) = G_TRUNC %1(s64)
996 %4:_(s1) = G_ICMP intpred(ult), %2(s32), %3
997 %5:_(s64) = G_ANYEXT %4(s1)
999 PseudoRET implicit $x10
1006 ; CHECK-LABEL: name: cmp_ult_i64
1007 ; CHECK: [[COPY:%[0-9]+]]:_(s64) = COPY $x10
1008 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:_(s64) = COPY $x11
1009 ; CHECK-NEXT: [[ICMP:%[0-9]+]]:_(s64) = G_ICMP intpred(ult), [[COPY]](s64), [[COPY1]]
1010 ; CHECK-NEXT: $x10 = COPY [[ICMP]](s64)
1011 ; CHECK-NEXT: PseudoRET implicit $x10
1012 %0:_(s64) = COPY $x10
1013 %1:_(s64) = COPY $x11
1014 %2:_(s1) = G_ICMP intpred(ult), %0(s64), %1
1015 %3:_(s64) = G_ANYEXT %2(s1)
1017 PseudoRET implicit $x10
1024 ; CHECK-LABEL: name: cmp_ult_i72
1025 ; CHECK: %xhi:_(s64) = COPY $x10
1026 ; CHECK-NEXT: %xlo:_(s64) = COPY $x11
1027 ; CHECK-NEXT: %yhi:_(s64) = COPY $x12
1028 ; CHECK-NEXT: %ylo:_(s64) = COPY $x13
1029 ; CHECK-NEXT: [[C:%[0-9]+]]:_(s64) = G_CONSTANT i64 -1
1030 ; CHECK-NEXT: [[C1:%[0-9]+]]:_(s64) = G_CONSTANT i64 255
1031 ; CHECK-NEXT: [[AND:%[0-9]+]]:_(s64) = G_AND %xhi, [[C]]
1032 ; CHECK-NEXT: [[AND1:%[0-9]+]]:_(s64) = G_AND %xlo, [[C1]]
1033 ; CHECK-NEXT: [[AND2:%[0-9]+]]:_(s64) = G_AND %yhi, [[C]]
1034 ; CHECK-NEXT: [[AND3:%[0-9]+]]:_(s64) = G_AND %ylo, [[C1]]
1035 ; CHECK-NEXT: [[ICMP:%[0-9]+]]:_(s64) = G_ICMP intpred(ult), [[AND1]](s64), [[AND3]]
1036 ; CHECK-NEXT: [[ICMP1:%[0-9]+]]:_(s64) = G_ICMP intpred(eq), [[AND1]](s64), [[AND3]]
1037 ; CHECK-NEXT: [[ICMP2:%[0-9]+]]:_(s64) = G_ICMP intpred(ult), [[AND]](s64), [[AND2]]
1038 ; CHECK-NEXT: [[TRUNC:%[0-9]+]]:_(s32) = G_TRUNC [[ICMP2]](s64)
1039 ; CHECK-NEXT: [[TRUNC1:%[0-9]+]]:_(s32) = G_TRUNC [[ICMP]](s64)
1040 ; CHECK-NEXT: [[SELECT:%[0-9]+]]:_(s32) = G_SELECT [[ICMP1]](s64), [[TRUNC]], [[TRUNC1]]
1041 ; CHECK-NEXT: %z0:_(s64) = G_ANYEXT [[SELECT]](s32)
1042 ; CHECK-NEXT: $x10 = COPY %z0(s64)
1043 ; CHECK-NEXT: PseudoRET implicit $x10
1044 %xhi:_(s64) = COPY $x10
1045 %xlo:_(s64) = COPY $x11
1046 %yhi:_(s64) = COPY $x12
1047 %ylo:_(s64) = COPY $x13
1048 %x0:_(s128) = G_MERGE_VALUES %xhi(s64), %xlo(s64)
1049 %y0:_(s128) = G_MERGE_VALUES %yhi(s64), %ylo(s64)
1050 %x:_(s72) = G_TRUNC %x0(s128)
1051 %y:_(s72) = G_TRUNC %y0(s128)
1052 %z:_(s1) = G_ICMP intpred(ult), %x, %y
1053 %z0:_(s64) = G_ANYEXT %z(s1)
1054 $x10 = COPY %z0(s64)
1055 PseudoRET implicit $x10
1062 ; CHECK-LABEL: name: cmp_ult_i128
1063 ; CHECK: %xhi:_(s64) = COPY $x10
1064 ; CHECK-NEXT: %xlo:_(s64) = COPY $x11
1065 ; CHECK-NEXT: %yhi:_(s64) = COPY $x12
1066 ; CHECK-NEXT: %ylo:_(s64) = COPY $x13
1067 ; CHECK-NEXT: [[ICMP:%[0-9]+]]:_(s64) = G_ICMP intpred(sge), %xlo(s64), %ylo
1068 ; CHECK-NEXT: [[ICMP1:%[0-9]+]]:_(s64) = G_ICMP intpred(eq), %xlo(s64), %ylo
1069 ; CHECK-NEXT: [[ICMP2:%[0-9]+]]:_(s64) = G_ICMP intpred(uge), %xhi(s64), %yhi
1070 ; CHECK-NEXT: [[TRUNC:%[0-9]+]]:_(s32) = G_TRUNC [[ICMP2]](s64)
1071 ; CHECK-NEXT: [[TRUNC1:%[0-9]+]]:_(s32) = G_TRUNC [[ICMP]](s64)
1072 ; CHECK-NEXT: [[SELECT:%[0-9]+]]:_(s32) = G_SELECT [[ICMP1]](s64), [[TRUNC]], [[TRUNC1]]
1073 ; CHECK-NEXT: %z0:_(s64) = G_ANYEXT [[SELECT]](s32)
1074 ; CHECK-NEXT: $x10 = COPY %z0(s64)
1075 ; CHECK-NEXT: PseudoRET implicit $x10
1076 %xhi:_(s64) = COPY $x10
1077 %xlo:_(s64) = COPY $x11
1078 %yhi:_(s64) = COPY $x12
1079 %ylo:_(s64) = COPY $x13
1080 %x:_(s128) = G_MERGE_VALUES %xhi(s64), %xlo(s64)
1081 %y:_(s128) = G_MERGE_VALUES %yhi(s64), %ylo(s64)
1082 %z:_(s1) = G_ICMP intpred(sge), %x, %y
1083 %z0:_(s64) = G_ANYEXT %z(s1)
1084 $x10 = COPY %z0(s64)
1085 PseudoRET implicit $x10
1092 ; CHECK-LABEL: name: cmp_uge_i8
1093 ; CHECK: [[COPY:%[0-9]+]]:_(s64) = COPY $x10
1094 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:_(s64) = COPY $x11
1095 ; CHECK-NEXT: [[C:%[0-9]+]]:_(s64) = G_CONSTANT i64 255
1096 ; CHECK-NEXT: [[AND:%[0-9]+]]:_(s64) = G_AND [[COPY]], [[C]]
1097 ; CHECK-NEXT: [[AND1:%[0-9]+]]:_(s64) = G_AND [[COPY1]], [[C]]
1098 ; CHECK-NEXT: [[ICMP:%[0-9]+]]:_(s64) = G_ICMP intpred(uge), [[AND]](s64), [[AND1]]
1099 ; CHECK-NEXT: $x10 = COPY [[ICMP]](s64)
1100 ; CHECK-NEXT: PseudoRET implicit $x10
1101 %0:_(s64) = COPY $x10
1102 %1:_(s64) = COPY $x11
1103 %2:_(s8) = G_TRUNC %0(s64)
1104 %3:_(s8) = G_TRUNC %1(s64)
1105 %4:_(s1) = G_ICMP intpred(uge), %2(s8), %3
1106 %5:_(s64) = G_ANYEXT %4(s1)
1108 PseudoRET implicit $x10
1115 ; CHECK-LABEL: name: cmp_uge_i15
1116 ; CHECK: [[COPY:%[0-9]+]]:_(s64) = COPY $x10
1117 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:_(s64) = COPY $x11
1118 ; CHECK-NEXT: [[C:%[0-9]+]]:_(s64) = G_CONSTANT i64 32767
1119 ; CHECK-NEXT: [[AND:%[0-9]+]]:_(s64) = G_AND [[COPY]], [[C]]
1120 ; CHECK-NEXT: [[AND1:%[0-9]+]]:_(s64) = G_AND [[COPY1]], [[C]]
1121 ; CHECK-NEXT: [[ICMP:%[0-9]+]]:_(s64) = G_ICMP intpred(uge), [[AND]](s64), [[AND1]]
1122 ; CHECK-NEXT: $x10 = COPY [[ICMP]](s64)
1123 ; CHECK-NEXT: PseudoRET implicit $x10
1124 %0:_(s64) = COPY $x10
1125 %1:_(s64) = COPY $x11
1126 %2:_(s15) = G_TRUNC %0(s64)
1127 %3:_(s15) = G_TRUNC %1(s64)
1128 %4:_(s1) = G_ICMP intpred(uge), %2(s15), %3
1129 %5:_(s64) = G_ANYEXT %4(s1)
1131 PseudoRET implicit $x10
1138 ; CHECK-LABEL: name: cmp_uge_i16
1139 ; CHECK: [[COPY:%[0-9]+]]:_(s64) = COPY $x10
1140 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:_(s64) = COPY $x11
1141 ; CHECK-NEXT: [[C:%[0-9]+]]:_(s64) = G_CONSTANT i64 65535
1142 ; CHECK-NEXT: [[AND:%[0-9]+]]:_(s64) = G_AND [[COPY]], [[C]]
1143 ; CHECK-NEXT: [[AND1:%[0-9]+]]:_(s64) = G_AND [[COPY1]], [[C]]
1144 ; CHECK-NEXT: [[ICMP:%[0-9]+]]:_(s64) = G_ICMP intpred(uge), [[AND]](s64), [[AND1]]
1145 ; CHECK-NEXT: $x10 = COPY [[ICMP]](s64)
1146 ; CHECK-NEXT: PseudoRET implicit $x10
1147 %0:_(s64) = COPY $x10
1148 %1:_(s64) = COPY $x11
1149 %2:_(s16) = G_TRUNC %0(s64)
1150 %3:_(s16) = G_TRUNC %1(s64)
1151 %4:_(s1) = G_ICMP intpred(uge), %2(s16), %3
1152 %5:_(s64) = G_ANYEXT %4(s1)
1154 PseudoRET implicit $x10
1161 ; CHECK-LABEL: name: cmp_uge_i32
1162 ; CHECK: [[COPY:%[0-9]+]]:_(s64) = COPY $x10
1163 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:_(s64) = COPY $x11
1164 ; CHECK-NEXT: [[C:%[0-9]+]]:_(s64) = G_CONSTANT i64 4294967295
1165 ; CHECK-NEXT: [[AND:%[0-9]+]]:_(s64) = G_AND [[COPY]], [[C]]
1166 ; CHECK-NEXT: [[AND1:%[0-9]+]]:_(s64) = G_AND [[COPY1]], [[C]]
1167 ; CHECK-NEXT: [[ICMP:%[0-9]+]]:_(s64) = G_ICMP intpred(uge), [[AND]](s64), [[AND1]]
1168 ; CHECK-NEXT: $x10 = COPY [[ICMP]](s64)
1169 ; CHECK-NEXT: PseudoRET implicit $x10
1170 %0:_(s64) = COPY $x10
1171 %1:_(s64) = COPY $x11
1172 %2:_(s32) = G_TRUNC %0(s64)
1173 %3:_(s32) = G_TRUNC %1(s64)
1174 %4:_(s1) = G_ICMP intpred(uge), %2(s32), %3
1175 %5:_(s64) = G_ANYEXT %4(s1)
1177 PseudoRET implicit $x10
1184 ; CHECK-LABEL: name: cmp_uge_i64
1185 ; CHECK: [[COPY:%[0-9]+]]:_(s64) = COPY $x10
1186 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:_(s64) = COPY $x11
1187 ; CHECK-NEXT: [[ICMP:%[0-9]+]]:_(s64) = G_ICMP intpred(uge), [[COPY]](s64), [[COPY1]]
1188 ; CHECK-NEXT: $x10 = COPY [[ICMP]](s64)
1189 ; CHECK-NEXT: PseudoRET implicit $x10
1190 %0:_(s64) = COPY $x10
1191 %1:_(s64) = COPY $x11
1192 %2:_(s1) = G_ICMP intpred(uge), %0(s64), %1
1193 %3:_(s64) = G_ANYEXT %2(s1)
1195 PseudoRET implicit $x10
1202 ; CHECK-LABEL: name: cmp_uge_i72
1203 ; CHECK: %xhi:_(s64) = COPY $x10
1204 ; CHECK-NEXT: %xlo:_(s64) = COPY $x11
1205 ; CHECK-NEXT: %yhi:_(s64) = COPY $x12
1206 ; CHECK-NEXT: %ylo:_(s64) = COPY $x13
1207 ; CHECK-NEXT: [[C:%[0-9]+]]:_(s64) = G_CONSTANT i64 -1
1208 ; CHECK-NEXT: [[C1:%[0-9]+]]:_(s64) = G_CONSTANT i64 255
1209 ; CHECK-NEXT: [[AND:%[0-9]+]]:_(s64) = G_AND %xhi, [[C]]
1210 ; CHECK-NEXT: [[AND1:%[0-9]+]]:_(s64) = G_AND %xlo, [[C1]]
1211 ; CHECK-NEXT: [[AND2:%[0-9]+]]:_(s64) = G_AND %yhi, [[C]]
1212 ; CHECK-NEXT: [[AND3:%[0-9]+]]:_(s64) = G_AND %ylo, [[C1]]
1213 ; CHECK-NEXT: [[ICMP:%[0-9]+]]:_(s64) = G_ICMP intpred(uge), [[AND1]](s64), [[AND3]]
1214 ; CHECK-NEXT: [[ICMP1:%[0-9]+]]:_(s64) = G_ICMP intpred(eq), [[AND1]](s64), [[AND3]]
1215 ; CHECK-NEXT: [[ICMP2:%[0-9]+]]:_(s64) = G_ICMP intpred(uge), [[AND]](s64), [[AND2]]
1216 ; CHECK-NEXT: [[TRUNC:%[0-9]+]]:_(s32) = G_TRUNC [[ICMP2]](s64)
1217 ; CHECK-NEXT: [[TRUNC1:%[0-9]+]]:_(s32) = G_TRUNC [[ICMP]](s64)
1218 ; CHECK-NEXT: [[SELECT:%[0-9]+]]:_(s32) = G_SELECT [[ICMP1]](s64), [[TRUNC]], [[TRUNC1]]
1219 ; CHECK-NEXT: %z0:_(s64) = G_ANYEXT [[SELECT]](s32)
1220 ; CHECK-NEXT: $x10 = COPY %z0(s64)
1221 ; CHECK-NEXT: PseudoRET implicit $x10
1222 %xhi:_(s64) = COPY $x10
1223 %xlo:_(s64) = COPY $x11
1224 %yhi:_(s64) = COPY $x12
1225 %ylo:_(s64) = COPY $x13
1226 %x0:_(s128) = G_MERGE_VALUES %xhi(s64), %xlo(s64)
1227 %y0:_(s128) = G_MERGE_VALUES %yhi(s64), %ylo(s64)
1228 %x:_(s72) = G_TRUNC %x0(s128)
1229 %y:_(s72) = G_TRUNC %y0(s128)
1230 %z:_(s1) = G_ICMP intpred(uge), %x, %y
1231 %z0:_(s64) = G_ANYEXT %z(s1)
1232 $x10 = COPY %z0(s64)
1233 PseudoRET implicit $x10
1240 ; CHECK-LABEL: name: cmp_uge_i128
1241 ; CHECK: %xhi:_(s64) = COPY $x10
1242 ; CHECK-NEXT: %xlo:_(s64) = COPY $x11
1243 ; CHECK-NEXT: %yhi:_(s64) = COPY $x12
1244 ; CHECK-NEXT: %ylo:_(s64) = COPY $x13
1245 ; CHECK-NEXT: [[ICMP:%[0-9]+]]:_(s64) = G_ICMP intpred(uge), %xlo(s64), %ylo
1246 ; CHECK-NEXT: [[ICMP1:%[0-9]+]]:_(s64) = G_ICMP intpred(eq), %xlo(s64), %ylo
1247 ; CHECK-NEXT: [[ICMP2:%[0-9]+]]:_(s64) = G_ICMP intpred(uge), %xhi(s64), %yhi
1248 ; CHECK-NEXT: [[TRUNC:%[0-9]+]]:_(s32) = G_TRUNC [[ICMP2]](s64)
1249 ; CHECK-NEXT: [[TRUNC1:%[0-9]+]]:_(s32) = G_TRUNC [[ICMP]](s64)
1250 ; CHECK-NEXT: [[SELECT:%[0-9]+]]:_(s32) = G_SELECT [[ICMP1]](s64), [[TRUNC]], [[TRUNC1]]
1251 ; CHECK-NEXT: %z0:_(s64) = G_ANYEXT [[SELECT]](s32)
1252 ; CHECK-NEXT: $x10 = COPY %z0(s64)
1253 ; CHECK-NEXT: PseudoRET implicit $x10
1254 %xhi:_(s64) = COPY $x10
1255 %xlo:_(s64) = COPY $x11
1256 %yhi:_(s64) = COPY $x12
1257 %ylo:_(s64) = COPY $x13
1258 %x:_(s128) = G_MERGE_VALUES %xhi(s64), %xlo(s64)
1259 %y:_(s128) = G_MERGE_VALUES %yhi(s64), %ylo(s64)
1260 %z:_(s1) = G_ICMP intpred(uge), %x, %y
1261 %z0:_(s64) = G_ANYEXT %z(s1)
1262 $x10 = COPY %z0(s64)
1263 PseudoRET implicit $x10
1270 ; CHECK-LABEL: name: cmp_ule_i8
1271 ; CHECK: [[COPY:%[0-9]+]]:_(s64) = COPY $x10
1272 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:_(s64) = COPY $x11
1273 ; CHECK-NEXT: [[C:%[0-9]+]]:_(s64) = G_CONSTANT i64 255
1274 ; CHECK-NEXT: [[AND:%[0-9]+]]:_(s64) = G_AND [[COPY]], [[C]]
1275 ; CHECK-NEXT: [[AND1:%[0-9]+]]:_(s64) = G_AND [[COPY1]], [[C]]
1276 ; CHECK-NEXT: [[ICMP:%[0-9]+]]:_(s64) = G_ICMP intpred(ule), [[AND]](s64), [[AND1]]
1277 ; CHECK-NEXT: $x10 = COPY [[ICMP]](s64)
1278 ; CHECK-NEXT: PseudoRET implicit $x10
1279 %0:_(s64) = COPY $x10
1280 %1:_(s64) = COPY $x11
1281 %2:_(s8) = G_TRUNC %0(s64)
1282 %3:_(s8) = G_TRUNC %1(s64)
1283 %4:_(s1) = G_ICMP intpred(ule), %2(s8), %3
1284 %5:_(s64) = G_ANYEXT %4(s1)
1286 PseudoRET implicit $x10
1293 ; CHECK-LABEL: name: cmp_ule_i15
1294 ; CHECK: [[COPY:%[0-9]+]]:_(s64) = COPY $x10
1295 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:_(s64) = COPY $x11
1296 ; CHECK-NEXT: [[C:%[0-9]+]]:_(s64) = G_CONSTANT i64 32767
1297 ; CHECK-NEXT: [[AND:%[0-9]+]]:_(s64) = G_AND [[COPY]], [[C]]
1298 ; CHECK-NEXT: [[AND1:%[0-9]+]]:_(s64) = G_AND [[COPY1]], [[C]]
1299 ; CHECK-NEXT: [[ICMP:%[0-9]+]]:_(s64) = G_ICMP intpred(ule), [[AND]](s64), [[AND1]]
1300 ; CHECK-NEXT: $x10 = COPY [[ICMP]](s64)
1301 ; CHECK-NEXT: PseudoRET implicit $x10
1302 %0:_(s64) = COPY $x10
1303 %1:_(s64) = COPY $x11
1304 %2:_(s15) = G_TRUNC %0(s64)
1305 %3:_(s15) = G_TRUNC %1(s64)
1306 %4:_(s1) = G_ICMP intpred(ule), %2(s15), %3
1307 %5:_(s64) = G_ANYEXT %4(s1)
1309 PseudoRET implicit $x10
1316 ; CHECK-LABEL: name: cmp_ule_i16
1317 ; CHECK: [[COPY:%[0-9]+]]:_(s64) = COPY $x10
1318 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:_(s64) = COPY $x11
1319 ; CHECK-NEXT: [[C:%[0-9]+]]:_(s64) = G_CONSTANT i64 65535
1320 ; CHECK-NEXT: [[AND:%[0-9]+]]:_(s64) = G_AND [[COPY]], [[C]]
1321 ; CHECK-NEXT: [[AND1:%[0-9]+]]:_(s64) = G_AND [[COPY1]], [[C]]
1322 ; CHECK-NEXT: [[ICMP:%[0-9]+]]:_(s64) = G_ICMP intpred(ule), [[AND]](s64), [[AND1]]
1323 ; CHECK-NEXT: $x10 = COPY [[ICMP]](s64)
1324 ; CHECK-NEXT: PseudoRET implicit $x10
1325 %0:_(s64) = COPY $x10
1326 %1:_(s64) = COPY $x11
1327 %2:_(s16) = G_TRUNC %0(s64)
1328 %3:_(s16) = G_TRUNC %1(s64)
1329 %4:_(s1) = G_ICMP intpred(ule), %2(s16), %3
1330 %5:_(s64) = G_ANYEXT %4(s1)
1332 PseudoRET implicit $x10
1339 ; CHECK-LABEL: name: cmp_ule_i32
1340 ; CHECK: [[COPY:%[0-9]+]]:_(s64) = COPY $x10
1341 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:_(s64) = COPY $x11
1342 ; CHECK-NEXT: [[C:%[0-9]+]]:_(s64) = G_CONSTANT i64 4294967295
1343 ; CHECK-NEXT: [[AND:%[0-9]+]]:_(s64) = G_AND [[COPY]], [[C]]
1344 ; CHECK-NEXT: [[AND1:%[0-9]+]]:_(s64) = G_AND [[COPY1]], [[C]]
1345 ; CHECK-NEXT: [[ICMP:%[0-9]+]]:_(s64) = G_ICMP intpred(ule), [[AND]](s64), [[AND1]]
1346 ; CHECK-NEXT: $x10 = COPY [[ICMP]](s64)
1347 ; CHECK-NEXT: PseudoRET implicit $x10
1348 %0:_(s64) = COPY $x10
1349 %1:_(s64) = COPY $x11
1350 %2:_(s32) = G_TRUNC %0(s64)
1351 %3:_(s32) = G_TRUNC %1(s64)
1352 %4:_(s1) = G_ICMP intpred(ule), %2(s32), %3
1353 %5:_(s64) = G_ANYEXT %4(s1)
1355 PseudoRET implicit $x10
1362 ; CHECK-LABEL: name: cmp_ule_i64
1363 ; CHECK: [[COPY:%[0-9]+]]:_(s64) = COPY $x10
1364 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:_(s64) = COPY $x11
1365 ; CHECK-NEXT: [[ICMP:%[0-9]+]]:_(s64) = G_ICMP intpred(ule), [[COPY]](s64), [[COPY1]]
1366 ; CHECK-NEXT: $x10 = COPY [[ICMP]](s64)
1367 ; CHECK-NEXT: PseudoRET implicit $x10
1368 %0:_(s64) = COPY $x10
1369 %1:_(s64) = COPY $x11
1370 %2:_(s1) = G_ICMP intpred(ule), %0(s64), %1
1371 %3:_(s64) = G_ANYEXT %2(s1)
1373 PseudoRET implicit $x10
1380 ; CHECK-LABEL: name: cmp_ule_i72
1381 ; CHECK: %xhi:_(s64) = COPY $x10
1382 ; CHECK-NEXT: %xlo:_(s64) = COPY $x11
1383 ; CHECK-NEXT: %yhi:_(s64) = COPY $x12
1384 ; CHECK-NEXT: %ylo:_(s64) = COPY $x13
1385 ; CHECK-NEXT: [[C:%[0-9]+]]:_(s64) = G_CONSTANT i64 -1
1386 ; CHECK-NEXT: [[C1:%[0-9]+]]:_(s64) = G_CONSTANT i64 255
1387 ; CHECK-NEXT: [[AND:%[0-9]+]]:_(s64) = G_AND %xhi, [[C]]
1388 ; CHECK-NEXT: [[AND1:%[0-9]+]]:_(s64) = G_AND %xlo, [[C1]]
1389 ; CHECK-NEXT: [[AND2:%[0-9]+]]:_(s64) = G_AND %yhi, [[C]]
1390 ; CHECK-NEXT: [[AND3:%[0-9]+]]:_(s64) = G_AND %ylo, [[C1]]
1391 ; CHECK-NEXT: [[ICMP:%[0-9]+]]:_(s64) = G_ICMP intpred(ule), [[AND1]](s64), [[AND3]]
1392 ; CHECK-NEXT: [[ICMP1:%[0-9]+]]:_(s64) = G_ICMP intpred(eq), [[AND1]](s64), [[AND3]]
1393 ; CHECK-NEXT: [[ICMP2:%[0-9]+]]:_(s64) = G_ICMP intpred(ule), [[AND]](s64), [[AND2]]
1394 ; CHECK-NEXT: [[TRUNC:%[0-9]+]]:_(s32) = G_TRUNC [[ICMP2]](s64)
1395 ; CHECK-NEXT: [[TRUNC1:%[0-9]+]]:_(s32) = G_TRUNC [[ICMP]](s64)
1396 ; CHECK-NEXT: [[SELECT:%[0-9]+]]:_(s32) = G_SELECT [[ICMP1]](s64), [[TRUNC]], [[TRUNC1]]
1397 ; CHECK-NEXT: %z0:_(s64) = G_ANYEXT [[SELECT]](s32)
1398 ; CHECK-NEXT: $x10 = COPY %z0(s64)
1399 ; CHECK-NEXT: PseudoRET implicit $x10
1400 %xhi:_(s64) = COPY $x10
1401 %xlo:_(s64) = COPY $x11
1402 %yhi:_(s64) = COPY $x12
1403 %ylo:_(s64) = COPY $x13
1404 %x0:_(s128) = G_MERGE_VALUES %xhi(s64), %xlo(s64)
1405 %y0:_(s128) = G_MERGE_VALUES %yhi(s64), %ylo(s64)
1406 %x:_(s72) = G_TRUNC %x0(s128)
1407 %y:_(s72) = G_TRUNC %y0(s128)
1408 %z:_(s1) = G_ICMP intpred(ule), %x, %y
1409 %z0:_(s64) = G_ANYEXT %z(s1)
1410 $x10 = COPY %z0(s64)
1411 PseudoRET implicit $x10
1418 ; CHECK-LABEL: name: cmp_ule_i128
1419 ; CHECK: %xhi:_(s64) = COPY $x10
1420 ; CHECK-NEXT: %xlo:_(s64) = COPY $x11
1421 ; CHECK-NEXT: %yhi:_(s64) = COPY $x12
1422 ; CHECK-NEXT: %ylo:_(s64) = COPY $x13
1423 ; CHECK-NEXT: [[ICMP:%[0-9]+]]:_(s64) = G_ICMP intpred(ule), %xlo(s64), %ylo
1424 ; CHECK-NEXT: [[ICMP1:%[0-9]+]]:_(s64) = G_ICMP intpred(eq), %xlo(s64), %ylo
1425 ; CHECK-NEXT: [[ICMP2:%[0-9]+]]:_(s64) = G_ICMP intpred(ule), %xhi(s64), %yhi
1426 ; CHECK-NEXT: [[TRUNC:%[0-9]+]]:_(s32) = G_TRUNC [[ICMP2]](s64)
1427 ; CHECK-NEXT: [[TRUNC1:%[0-9]+]]:_(s32) = G_TRUNC [[ICMP]](s64)
1428 ; CHECK-NEXT: [[SELECT:%[0-9]+]]:_(s32) = G_SELECT [[ICMP1]](s64), [[TRUNC]], [[TRUNC1]]
1429 ; CHECK-NEXT: %z0:_(s64) = G_ANYEXT [[SELECT]](s32)
1430 ; CHECK-NEXT: $x10 = COPY %z0(s64)
1431 ; CHECK-NEXT: PseudoRET implicit $x10
1432 %xhi:_(s64) = COPY $x10
1433 %xlo:_(s64) = COPY $x11
1434 %yhi:_(s64) = COPY $x12
1435 %ylo:_(s64) = COPY $x13
1436 %x:_(s128) = G_MERGE_VALUES %xhi(s64), %xlo(s64)
1437 %y:_(s128) = G_MERGE_VALUES %yhi(s64), %ylo(s64)
1438 %z:_(s1) = G_ICMP intpred(ule), %x, %y
1439 %z0:_(s64) = G_ANYEXT %z(s1)
1440 $x10 = COPY %z0(s64)
1441 PseudoRET implicit $x10
1448 ; CHECK-LABEL: name: cmp_eq_i8
1449 ; CHECK: [[COPY:%[0-9]+]]:_(s64) = COPY $x10
1450 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:_(s64) = COPY $x11
1451 ; CHECK-NEXT: [[C:%[0-9]+]]:_(s64) = G_CONSTANT i64 255
1452 ; CHECK-NEXT: [[AND:%[0-9]+]]:_(s64) = G_AND [[COPY]], [[C]]
1453 ; CHECK-NEXT: [[AND1:%[0-9]+]]:_(s64) = G_AND [[COPY1]], [[C]]
1454 ; CHECK-NEXT: [[ICMP:%[0-9]+]]:_(s64) = G_ICMP intpred(eq), [[AND]](s64), [[AND1]]
1455 ; CHECK-NEXT: $x10 = COPY [[ICMP]](s64)
1456 ; CHECK-NEXT: PseudoRET implicit $x10
1457 %0:_(s64) = COPY $x10
1458 %1:_(s64) = COPY $x11
1459 %2:_(s8) = G_TRUNC %0(s64)
1460 %3:_(s8) = G_TRUNC %1(s64)
1461 %4:_(s1) = G_ICMP intpred(eq), %2(s8), %3
1462 %5:_(s64) = G_ANYEXT %4(s1)
1464 PseudoRET implicit $x10
1471 ; CHECK-LABEL: name: cmp_eq_i15
1472 ; CHECK: [[COPY:%[0-9]+]]:_(s64) = COPY $x10
1473 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:_(s64) = COPY $x11
1474 ; CHECK-NEXT: [[C:%[0-9]+]]:_(s64) = G_CONSTANT i64 32767
1475 ; CHECK-NEXT: [[AND:%[0-9]+]]:_(s64) = G_AND [[COPY]], [[C]]
1476 ; CHECK-NEXT: [[AND1:%[0-9]+]]:_(s64) = G_AND [[COPY1]], [[C]]
1477 ; CHECK-NEXT: [[ICMP:%[0-9]+]]:_(s64) = G_ICMP intpred(eq), [[AND]](s64), [[AND1]]
1478 ; CHECK-NEXT: $x10 = COPY [[ICMP]](s64)
1479 ; CHECK-NEXT: PseudoRET implicit $x10
1480 %0:_(s64) = COPY $x10
1481 %1:_(s64) = COPY $x11
1482 %2:_(s15) = G_TRUNC %0(s64)
1483 %3:_(s15) = G_TRUNC %1(s64)
1484 %4:_(s1) = G_ICMP intpred(eq), %2(s15), %3
1485 %5:_(s64) = G_ANYEXT %4(s1)
1487 PseudoRET implicit $x10
1494 ; CHECK-LABEL: name: cmp_eq_i16
1495 ; CHECK: [[COPY:%[0-9]+]]:_(s64) = COPY $x10
1496 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:_(s64) = COPY $x11
1497 ; CHECK-NEXT: [[C:%[0-9]+]]:_(s64) = G_CONSTANT i64 65535
1498 ; CHECK-NEXT: [[AND:%[0-9]+]]:_(s64) = G_AND [[COPY]], [[C]]
1499 ; CHECK-NEXT: [[AND1:%[0-9]+]]:_(s64) = G_AND [[COPY1]], [[C]]
1500 ; CHECK-NEXT: [[ICMP:%[0-9]+]]:_(s64) = G_ICMP intpred(eq), [[AND]](s64), [[AND1]]
1501 ; CHECK-NEXT: $x10 = COPY [[ICMP]](s64)
1502 ; CHECK-NEXT: PseudoRET implicit $x10
1503 %0:_(s64) = COPY $x10
1504 %1:_(s64) = COPY $x11
1505 %2:_(s16) = G_TRUNC %0(s64)
1506 %3:_(s16) = G_TRUNC %1(s64)
1507 %4:_(s1) = G_ICMP intpred(eq), %2(s16), %3
1508 %5:_(s64) = G_ANYEXT %4(s1)
1510 PseudoRET implicit $x10
1517 ; CHECK-LABEL: name: cmp_eq_i32
1518 ; CHECK: [[COPY:%[0-9]+]]:_(s64) = COPY $x10
1519 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:_(s64) = COPY $x11
1520 ; CHECK-NEXT: [[C:%[0-9]+]]:_(s64) = G_CONSTANT i64 4294967295
1521 ; CHECK-NEXT: [[AND:%[0-9]+]]:_(s64) = G_AND [[COPY]], [[C]]
1522 ; CHECK-NEXT: [[AND1:%[0-9]+]]:_(s64) = G_AND [[COPY1]], [[C]]
1523 ; CHECK-NEXT: [[ICMP:%[0-9]+]]:_(s64) = G_ICMP intpred(eq), [[AND]](s64), [[AND1]]
1524 ; CHECK-NEXT: $x10 = COPY [[ICMP]](s64)
1525 ; CHECK-NEXT: PseudoRET implicit $x10
1526 %0:_(s64) = COPY $x10
1527 %1:_(s64) = COPY $x11
1528 %2:_(s32) = G_TRUNC %0(s64)
1529 %3:_(s32) = G_TRUNC %1(s64)
1530 %4:_(s1) = G_ICMP intpred(eq), %2(s32), %3
1531 %5:_(s64) = G_ANYEXT %4(s1)
1533 PseudoRET implicit $x10
1540 ; CHECK-LABEL: name: cmp_eq_i64
1541 ; CHECK: [[COPY:%[0-9]+]]:_(s64) = COPY $x10
1542 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:_(s64) = COPY $x11
1543 ; CHECK-NEXT: [[ICMP:%[0-9]+]]:_(s64) = G_ICMP intpred(eq), [[COPY]](s64), [[COPY1]]
1544 ; CHECK-NEXT: $x10 = COPY [[ICMP]](s64)
1545 ; CHECK-NEXT: PseudoRET implicit $x10
1546 %0:_(s64) = COPY $x10
1547 %1:_(s64) = COPY $x11
1548 %2:_(s1) = G_ICMP intpred(eq), %0(s64), %1
1549 %3:_(s64) = G_ANYEXT %2(s1)
1551 PseudoRET implicit $x10
1558 ; CHECK-LABEL: name: cmp_eq_i72
1559 ; CHECK: %xhi:_(s64) = COPY $x10
1560 ; CHECK-NEXT: %xlo:_(s64) = COPY $x11
1561 ; CHECK-NEXT: %yhi:_(s64) = COPY $x12
1562 ; CHECK-NEXT: %ylo:_(s64) = COPY $x13
1563 ; CHECK-NEXT: [[C:%[0-9]+]]:_(s64) = G_CONSTANT i64 -1
1564 ; CHECK-NEXT: [[C1:%[0-9]+]]:_(s64) = G_CONSTANT i64 255
1565 ; CHECK-NEXT: [[AND:%[0-9]+]]:_(s64) = G_AND %xhi, [[C]]
1566 ; CHECK-NEXT: [[AND1:%[0-9]+]]:_(s64) = G_AND %xlo, [[C1]]
1567 ; CHECK-NEXT: [[AND2:%[0-9]+]]:_(s64) = G_AND %yhi, [[C]]
1568 ; CHECK-NEXT: [[AND3:%[0-9]+]]:_(s64) = G_AND %ylo, [[C1]]
1569 ; CHECK-NEXT: [[C2:%[0-9]+]]:_(s64) = G_CONSTANT i64 0
1570 ; CHECK-NEXT: [[XOR:%[0-9]+]]:_(s64) = G_XOR [[AND]], [[AND2]]
1571 ; CHECK-NEXT: [[XOR1:%[0-9]+]]:_(s64) = G_XOR [[AND1]], [[AND3]]
1572 ; CHECK-NEXT: [[OR:%[0-9]+]]:_(s64) = G_OR [[XOR]], [[XOR1]]
1573 ; CHECK-NEXT: [[ICMP:%[0-9]+]]:_(s64) = G_ICMP intpred(eq), [[OR]](s64), [[C2]]
1574 ; CHECK-NEXT: $x10 = COPY [[ICMP]](s64)
1575 ; CHECK-NEXT: PseudoRET implicit $x10
1576 %xhi:_(s64) = COPY $x10
1577 %xlo:_(s64) = COPY $x11
1578 %yhi:_(s64) = COPY $x12
1579 %ylo:_(s64) = COPY $x13
1580 %x0:_(s128) = G_MERGE_VALUES %xhi(s64), %xlo(s64)
1581 %y0:_(s128) = G_MERGE_VALUES %yhi(s64), %ylo(s64)
1582 %x:_(s72) = G_TRUNC %x0(s128)
1583 %y:_(s72) = G_TRUNC %y0(s128)
1584 %z:_(s1) = G_ICMP intpred(eq), %x, %y
1585 %z0:_(s64) = G_ANYEXT %z(s1)
1586 $x10 = COPY %z0(s64)
1587 PseudoRET implicit $x10
1594 ; CHECK-LABEL: name: cmp_eq_i128
1595 ; CHECK: %xhi:_(s64) = COPY $x10
1596 ; CHECK-NEXT: %xlo:_(s64) = COPY $x11
1597 ; CHECK-NEXT: %yhi:_(s64) = COPY $x12
1598 ; CHECK-NEXT: %ylo:_(s64) = COPY $x13
1599 ; CHECK-NEXT: [[C:%[0-9]+]]:_(s64) = G_CONSTANT i64 0
1600 ; CHECK-NEXT: [[XOR:%[0-9]+]]:_(s64) = G_XOR %xhi, %yhi
1601 ; CHECK-NEXT: [[XOR1:%[0-9]+]]:_(s64) = G_XOR %xlo, %ylo
1602 ; CHECK-NEXT: [[OR:%[0-9]+]]:_(s64) = G_OR [[XOR]], [[XOR1]]
1603 ; CHECK-NEXT: [[ICMP:%[0-9]+]]:_(s64) = G_ICMP intpred(eq), [[OR]](s64), [[C]]
1604 ; CHECK-NEXT: $x10 = COPY [[ICMP]](s64)
1605 ; CHECK-NEXT: PseudoRET implicit $x10
1606 %xhi:_(s64) = COPY $x10
1607 %xlo:_(s64) = COPY $x11
1608 %yhi:_(s64) = COPY $x12
1609 %ylo:_(s64) = COPY $x13
1610 %x:_(s128) = G_MERGE_VALUES %xhi(s64), %xlo(s64)
1611 %y:_(s128) = G_MERGE_VALUES %yhi(s64), %ylo(s64)
1612 %z:_(s1) = G_ICMP intpred(eq), %x, %y
1613 %z0:_(s64) = G_ANYEXT %z(s1)
1614 $x10 = COPY %z0(s64)
1615 PseudoRET implicit $x10
1622 ; CHECK-LABEL: name: cmp_ne_i8
1623 ; CHECK: [[COPY:%[0-9]+]]:_(s64) = COPY $x10
1624 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:_(s64) = COPY $x11
1625 ; CHECK-NEXT: [[C:%[0-9]+]]:_(s64) = G_CONSTANT i64 255
1626 ; CHECK-NEXT: [[AND:%[0-9]+]]:_(s64) = G_AND [[COPY]], [[C]]
1627 ; CHECK-NEXT: [[AND1:%[0-9]+]]:_(s64) = G_AND [[COPY1]], [[C]]
1628 ; CHECK-NEXT: [[ICMP:%[0-9]+]]:_(s64) = G_ICMP intpred(ne), [[AND]](s64), [[AND1]]
1629 ; CHECK-NEXT: $x10 = COPY [[ICMP]](s64)
1630 ; CHECK-NEXT: PseudoRET implicit $x10
1631 %0:_(s64) = COPY $x10
1632 %1:_(s64) = COPY $x11
1633 %2:_(s8) = G_TRUNC %0(s64)
1634 %3:_(s8) = G_TRUNC %1(s64)
1635 %4:_(s1) = G_ICMP intpred(ne), %2(s8), %3
1636 %5:_(s64) = G_ANYEXT %4(s1)
1638 PseudoRET implicit $x10
1645 ; CHECK-LABEL: name: cmp_ne_i15
1646 ; CHECK: [[COPY:%[0-9]+]]:_(s64) = COPY $x10
1647 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:_(s64) = COPY $x11
1648 ; CHECK-NEXT: [[C:%[0-9]+]]:_(s64) = G_CONSTANT i64 32767
1649 ; CHECK-NEXT: [[AND:%[0-9]+]]:_(s64) = G_AND [[COPY]], [[C]]
1650 ; CHECK-NEXT: [[AND1:%[0-9]+]]:_(s64) = G_AND [[COPY1]], [[C]]
1651 ; CHECK-NEXT: [[ICMP:%[0-9]+]]:_(s64) = G_ICMP intpred(ne), [[AND]](s64), [[AND1]]
1652 ; CHECK-NEXT: $x10 = COPY [[ICMP]](s64)
1653 ; CHECK-NEXT: PseudoRET implicit $x10
1654 %0:_(s64) = COPY $x10
1655 %1:_(s64) = COPY $x11
1656 %2:_(s15) = G_TRUNC %0(s64)
1657 %3:_(s15) = G_TRUNC %1(s64)
1658 %4:_(s1) = G_ICMP intpred(ne), %2(s15), %3
1659 %5:_(s64) = G_ANYEXT %4(s1)
1661 PseudoRET implicit $x10
1668 ; CHECK-LABEL: name: cmp_ne_i16
1669 ; CHECK: [[COPY:%[0-9]+]]:_(s64) = COPY $x10
1670 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:_(s64) = COPY $x11
1671 ; CHECK-NEXT: [[C:%[0-9]+]]:_(s64) = G_CONSTANT i64 65535
1672 ; CHECK-NEXT: [[AND:%[0-9]+]]:_(s64) = G_AND [[COPY]], [[C]]
1673 ; CHECK-NEXT: [[AND1:%[0-9]+]]:_(s64) = G_AND [[COPY1]], [[C]]
1674 ; CHECK-NEXT: [[ICMP:%[0-9]+]]:_(s64) = G_ICMP intpred(ne), [[AND]](s64), [[AND1]]
1675 ; CHECK-NEXT: $x10 = COPY [[ICMP]](s64)
1676 ; CHECK-NEXT: PseudoRET implicit $x10
1677 %0:_(s64) = COPY $x10
1678 %1:_(s64) = COPY $x11
1679 %2:_(s16) = G_TRUNC %0(s64)
1680 %3:_(s16) = G_TRUNC %1(s64)
1681 %4:_(s1) = G_ICMP intpred(ne), %2(s16), %3
1682 %5:_(s64) = G_ANYEXT %4(s1)
1684 PseudoRET implicit $x10
1691 ; CHECK-LABEL: name: cmp_ne_i32
1692 ; CHECK: [[COPY:%[0-9]+]]:_(s64) = COPY $x10
1693 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:_(s64) = COPY $x11
1694 ; CHECK-NEXT: [[C:%[0-9]+]]:_(s64) = G_CONSTANT i64 4294967295
1695 ; CHECK-NEXT: [[AND:%[0-9]+]]:_(s64) = G_AND [[COPY]], [[C]]
1696 ; CHECK-NEXT: [[AND1:%[0-9]+]]:_(s64) = G_AND [[COPY1]], [[C]]
1697 ; CHECK-NEXT: [[ICMP:%[0-9]+]]:_(s64) = G_ICMP intpred(ne), [[AND]](s64), [[AND1]]
1698 ; CHECK-NEXT: $x10 = COPY [[ICMP]](s64)
1699 ; CHECK-NEXT: PseudoRET implicit $x10
1700 %0:_(s64) = COPY $x10
1701 %1:_(s64) = COPY $x11
1702 %2:_(s32) = G_TRUNC %0(s64)
1703 %3:_(s32) = G_TRUNC %1(s64)
1704 %4:_(s1) = G_ICMP intpred(ne), %2(s32), %3
1705 %5:_(s64) = G_ANYEXT %4(s1)
1707 PseudoRET implicit $x10
1714 ; CHECK-LABEL: name: cmp_ne_i64
1715 ; CHECK: [[COPY:%[0-9]+]]:_(s64) = COPY $x10
1716 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:_(s64) = COPY $x11
1717 ; CHECK-NEXT: [[ICMP:%[0-9]+]]:_(s64) = G_ICMP intpred(ne), [[COPY]](s64), [[COPY1]]
1718 ; CHECK-NEXT: $x10 = COPY [[ICMP]](s64)
1719 ; CHECK-NEXT: PseudoRET implicit $x10
1720 %0:_(s64) = COPY $x10
1721 %1:_(s64) = COPY $x11
1722 %2:_(s1) = G_ICMP intpred(ne), %0(s64), %1
1723 %3:_(s64) = G_ANYEXT %2(s1)
1725 PseudoRET implicit $x10
1732 ; CHECK-LABEL: name: cmp_ne_i72
1733 ; CHECK: %xhi:_(s64) = COPY $x10
1734 ; CHECK-NEXT: %xlo:_(s64) = COPY $x11
1735 ; CHECK-NEXT: %yhi:_(s64) = COPY $x12
1736 ; CHECK-NEXT: %ylo:_(s64) = COPY $x13
1737 ; CHECK-NEXT: [[C:%[0-9]+]]:_(s64) = G_CONSTANT i64 -1
1738 ; CHECK-NEXT: [[C1:%[0-9]+]]:_(s64) = G_CONSTANT i64 255
1739 ; CHECK-NEXT: [[AND:%[0-9]+]]:_(s64) = G_AND %xhi, [[C]]
1740 ; CHECK-NEXT: [[AND1:%[0-9]+]]:_(s64) = G_AND %xlo, [[C1]]
1741 ; CHECK-NEXT: [[AND2:%[0-9]+]]:_(s64) = G_AND %yhi, [[C]]
1742 ; CHECK-NEXT: [[AND3:%[0-9]+]]:_(s64) = G_AND %ylo, [[C1]]
1743 ; CHECK-NEXT: [[C2:%[0-9]+]]:_(s64) = G_CONSTANT i64 0
1744 ; CHECK-NEXT: [[XOR:%[0-9]+]]:_(s64) = G_XOR [[AND]], [[AND2]]
1745 ; CHECK-NEXT: [[XOR1:%[0-9]+]]:_(s64) = G_XOR [[AND1]], [[AND3]]
1746 ; CHECK-NEXT: [[OR:%[0-9]+]]:_(s64) = G_OR [[XOR]], [[XOR1]]
1747 ; CHECK-NEXT: [[ICMP:%[0-9]+]]:_(s64) = G_ICMP intpred(ne), [[OR]](s64), [[C2]]
1748 ; CHECK-NEXT: $x10 = COPY [[ICMP]](s64)
1749 ; CHECK-NEXT: PseudoRET implicit $x10
1750 %xhi:_(s64) = COPY $x10
1751 %xlo:_(s64) = COPY $x11
1752 %yhi:_(s64) = COPY $x12
1753 %ylo:_(s64) = COPY $x13
1754 %x0:_(s128) = G_MERGE_VALUES %xhi(s64), %xlo(s64)
1755 %y0:_(s128) = G_MERGE_VALUES %yhi(s64), %ylo(s64)
1756 %x:_(s72) = G_TRUNC %x0(s128)
1757 %y:_(s72) = G_TRUNC %y0(s128)
1758 %z:_(s1) = G_ICMP intpred(ne), %x, %y
1759 %z0:_(s64) = G_ANYEXT %z(s1)
1760 $x10 = COPY %z0(s64)
1761 PseudoRET implicit $x10
1768 ; CHECK-LABEL: name: cmp_ne_i128
1769 ; CHECK: %xhi:_(s64) = COPY $x10
1770 ; CHECK-NEXT: %xlo:_(s64) = COPY $x11
1771 ; CHECK-NEXT: %yhi:_(s64) = COPY $x12
1772 ; CHECK-NEXT: %ylo:_(s64) = COPY $x13
1773 ; CHECK-NEXT: [[C:%[0-9]+]]:_(s64) = G_CONSTANT i64 0
1774 ; CHECK-NEXT: [[XOR:%[0-9]+]]:_(s64) = G_XOR %xhi, %yhi
1775 ; CHECK-NEXT: [[XOR1:%[0-9]+]]:_(s64) = G_XOR %xlo, %ylo
1776 ; CHECK-NEXT: [[OR:%[0-9]+]]:_(s64) = G_OR [[XOR]], [[XOR1]]
1777 ; CHECK-NEXT: [[ICMP:%[0-9]+]]:_(s64) = G_ICMP intpred(ne), [[OR]](s64), [[C]]
1778 ; CHECK-NEXT: $x10 = COPY [[ICMP]](s64)
1779 ; CHECK-NEXT: PseudoRET implicit $x10
1780 %xhi:_(s64) = COPY $x10
1781 %xlo:_(s64) = COPY $x11
1782 %yhi:_(s64) = COPY $x12
1783 %ylo:_(s64) = COPY $x13
1784 %x:_(s128) = G_MERGE_VALUES %xhi(s64), %xlo(s64)
1785 %y:_(s128) = G_MERGE_VALUES %yhi(s64), %ylo(s64)
1786 %z:_(s1) = G_ICMP intpred(ne), %x, %y
1787 %z0:_(s64) = G_ANYEXT %z(s1)
1788 $x10 = COPY %z0(s64)
1789 PseudoRET implicit $x10
1796 ; CHECK-LABEL: name: cmp_ne_ptr
1797 ; CHECK: [[COPY:%[0-9]+]]:_(p0) = COPY $x10
1798 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:_(p0) = COPY $x11
1799 ; CHECK-NEXT: [[ICMP:%[0-9]+]]:_(s64) = G_ICMP intpred(ne), [[COPY]](p0), [[COPY1]]
1800 ; CHECK-NEXT: $x10 = COPY [[ICMP]](s64)
1801 ; CHECK-NEXT: PseudoRET implicit $x10
1802 %0:_(p0) = COPY $x10
1803 %1:_(p0) = COPY $x11
1804 %2:_(s1) = G_ICMP intpred(ne), %0(p0), %1
1805 %3:_(s64) = G_ANYEXT %2(s1)
1807 PseudoRET implicit $x10