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(ugt), %xhi(s64), %yhi
134 ; CHECK-NEXT: [[ICMP1:%[0-9]+]]:_(s64) = G_ICMP intpred(sgt), [[ASHR]](s64), [[ASHR1]]
135 ; CHECK-NEXT: [[ICMP2:%[0-9]+]]:_(s64) = G_ICMP intpred(eq), [[ASHR]](s64), [[ASHR1]]
136 ; CHECK-NEXT: [[TRUNC:%[0-9]+]]:_(s32) = G_TRUNC [[ICMP]](s64)
137 ; CHECK-NEXT: [[TRUNC1:%[0-9]+]]:_(s32) = G_TRUNC [[ICMP1]](s64)
138 ; CHECK-NEXT: [[SELECT:%[0-9]+]]:_(s32) = G_SELECT [[ICMP2]](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(ugt), %xhi(s64), %yhi
166 ; CHECK-NEXT: [[ICMP1:%[0-9]+]]:_(s64) = G_ICMP intpred(sgt), %xlo(s64), %ylo
167 ; CHECK-NEXT: [[ICMP2:%[0-9]+]]:_(s64) = G_ICMP intpred(eq), %xlo(s64), %ylo
168 ; CHECK-NEXT: [[TRUNC:%[0-9]+]]:_(s32) = G_TRUNC [[ICMP]](s64)
169 ; CHECK-NEXT: [[TRUNC1:%[0-9]+]]:_(s32) = G_TRUNC [[ICMP1]](s64)
170 ; CHECK-NEXT: [[SELECT:%[0-9]+]]:_(s32) = G_SELECT [[ICMP2]](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(uge), %xhi(s64), %yhi
316 ; CHECK-NEXT: [[ICMP1:%[0-9]+]]:_(s64) = G_ICMP intpred(sge), [[ASHR]](s64), [[ASHR1]]
317 ; CHECK-NEXT: [[ICMP2:%[0-9]+]]:_(s64) = G_ICMP intpred(eq), [[ASHR]](s64), [[ASHR1]]
318 ; CHECK-NEXT: [[TRUNC:%[0-9]+]]:_(s32) = G_TRUNC [[ICMP]](s64)
319 ; CHECK-NEXT: [[TRUNC1:%[0-9]+]]:_(s32) = G_TRUNC [[ICMP1]](s64)
320 ; CHECK-NEXT: [[SELECT:%[0-9]+]]:_(s32) = G_SELECT [[ICMP2]](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(ult), %xhi(s64), %yhi
348 ; CHECK-NEXT: [[ICMP1:%[0-9]+]]:_(s64) = G_ICMP intpred(slt), %xlo(s64), %ylo
349 ; CHECK-NEXT: [[ICMP2:%[0-9]+]]:_(s64) = G_ICMP intpred(eq), %xlo(s64), %ylo
350 ; CHECK-NEXT: [[TRUNC:%[0-9]+]]:_(s32) = G_TRUNC [[ICMP]](s64)
351 ; CHECK-NEXT: [[TRUNC1:%[0-9]+]]:_(s32) = G_TRUNC [[ICMP1]](s64)
352 ; CHECK-NEXT: [[SELECT:%[0-9]+]]:_(s32) = G_SELECT [[ICMP2]](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(uge), %xhi(s64), %yhi
498 ; CHECK-NEXT: [[ICMP1:%[0-9]+]]:_(s64) = G_ICMP intpred(sge), [[ASHR]](s64), [[ASHR1]]
499 ; CHECK-NEXT: [[ICMP2:%[0-9]+]]:_(s64) = G_ICMP intpred(eq), [[ASHR]](s64), [[ASHR1]]
500 ; CHECK-NEXT: [[TRUNC:%[0-9]+]]:_(s32) = G_TRUNC [[ICMP]](s64)
501 ; CHECK-NEXT: [[TRUNC1:%[0-9]+]]:_(s32) = G_TRUNC [[ICMP1]](s64)
502 ; CHECK-NEXT: [[SELECT:%[0-9]+]]:_(s32) = G_SELECT [[ICMP2]](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(uge), %xhi(s64), %yhi
530 ; CHECK-NEXT: [[ICMP1:%[0-9]+]]:_(s64) = G_ICMP intpred(sge), %xlo(s64), %ylo
531 ; CHECK-NEXT: [[ICMP2:%[0-9]+]]:_(s64) = G_ICMP intpred(eq), %xlo(s64), %ylo
532 ; CHECK-NEXT: [[TRUNC:%[0-9]+]]:_(s32) = G_TRUNC [[ICMP]](s64)
533 ; CHECK-NEXT: [[TRUNC1:%[0-9]+]]:_(s32) = G_TRUNC [[ICMP1]](s64)
534 ; CHECK-NEXT: [[SELECT:%[0-9]+]]:_(s32) = G_SELECT [[ICMP2]](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(ule), %xhi(s64), %yhi
680 ; CHECK-NEXT: [[ICMP1:%[0-9]+]]:_(s64) = G_ICMP intpred(sle), [[ASHR]](s64), [[ASHR1]]
681 ; CHECK-NEXT: [[ICMP2:%[0-9]+]]:_(s64) = G_ICMP intpred(eq), [[ASHR]](s64), [[ASHR1]]
682 ; CHECK-NEXT: [[TRUNC:%[0-9]+]]:_(s32) = G_TRUNC [[ICMP]](s64)
683 ; CHECK-NEXT: [[TRUNC1:%[0-9]+]]:_(s32) = G_TRUNC [[ICMP1]](s64)
684 ; CHECK-NEXT: [[SELECT:%[0-9]+]]:_(s32) = G_SELECT [[ICMP2]](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(ule), %xhi(s64), %yhi
712 ; CHECK-NEXT: [[ICMP1:%[0-9]+]]:_(s64) = G_ICMP intpred(sle), %xlo(s64), %ylo
713 ; CHECK-NEXT: [[ICMP2:%[0-9]+]]:_(s64) = G_ICMP intpred(eq), %xlo(s64), %ylo
714 ; CHECK-NEXT: [[TRUNC:%[0-9]+]]:_(s32) = G_TRUNC [[ICMP]](s64)
715 ; CHECK-NEXT: [[TRUNC1:%[0-9]+]]:_(s32) = G_TRUNC [[ICMP1]](s64)
716 ; CHECK-NEXT: [[SELECT:%[0-9]+]]:_(s32) = G_SELECT [[ICMP2]](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: [[SEXT_INREG:%[0-9]+]]:_(s64) = G_SEXT_INREG [[COPY]], 32
809 ; CHECK-NEXT: [[SEXT_INREG1:%[0-9]+]]:_(s64) = G_SEXT_INREG [[COPY1]], 32
810 ; CHECK-NEXT: [[ICMP:%[0-9]+]]:_(s64) = G_ICMP intpred(ugt), [[SEXT_INREG]](s64), [[SEXT_INREG1]]
811 ; CHECK-NEXT: $x10 = COPY [[ICMP]](s64)
812 ; CHECK-NEXT: PseudoRET implicit $x10
813 %0:_(s64) = COPY $x10
814 %1:_(s64) = COPY $x11
815 %2:_(s32) = G_TRUNC %0(s64)
816 %3:_(s32) = G_TRUNC %1(s64)
817 %4:_(s1) = G_ICMP intpred(ugt), %2(s32), %3
818 %5:_(s64) = G_ANYEXT %4(s1)
820 PseudoRET implicit $x10
827 ; CHECK-LABEL: name: cmp_ugt_i64
828 ; CHECK: [[COPY:%[0-9]+]]:_(s64) = COPY $x10
829 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:_(s64) = COPY $x11
830 ; CHECK-NEXT: [[ICMP:%[0-9]+]]:_(s64) = G_ICMP intpred(ugt), [[COPY]](s64), [[COPY1]]
831 ; CHECK-NEXT: $x10 = COPY [[ICMP]](s64)
832 ; CHECK-NEXT: PseudoRET implicit $x10
833 %0:_(s64) = COPY $x10
834 %1:_(s64) = COPY $x11
835 %2:_(s1) = G_ICMP intpred(ugt), %0(s64), %1
836 %3:_(s64) = G_ANYEXT %2(s1)
838 PseudoRET implicit $x10
845 ; CHECK-LABEL: name: cmp_ugt_i72
846 ; CHECK: %xhi:_(s64) = COPY $x10
847 ; CHECK-NEXT: %xlo:_(s64) = COPY $x11
848 ; CHECK-NEXT: %yhi:_(s64) = COPY $x12
849 ; CHECK-NEXT: %ylo:_(s64) = COPY $x13
850 ; CHECK-NEXT: [[C:%[0-9]+]]:_(s64) = G_CONSTANT i64 -1
851 ; CHECK-NEXT: [[C1:%[0-9]+]]:_(s64) = G_CONSTANT i64 255
852 ; CHECK-NEXT: [[AND:%[0-9]+]]:_(s64) = G_AND %xhi, [[C]]
853 ; CHECK-NEXT: [[AND1:%[0-9]+]]:_(s64) = G_AND %xlo, [[C1]]
854 ; CHECK-NEXT: [[AND2:%[0-9]+]]:_(s64) = G_AND %yhi, [[C]]
855 ; CHECK-NEXT: [[AND3:%[0-9]+]]:_(s64) = G_AND %ylo, [[C1]]
856 ; CHECK-NEXT: [[ICMP:%[0-9]+]]:_(s64) = G_ICMP intpred(ugt), [[AND]](s64), [[AND2]]
857 ; CHECK-NEXT: [[ICMP1:%[0-9]+]]:_(s64) = G_ICMP intpred(ugt), [[AND1]](s64), [[AND3]]
858 ; CHECK-NEXT: [[ICMP2:%[0-9]+]]:_(s64) = G_ICMP intpred(eq), [[AND1]](s64), [[AND3]]
859 ; CHECK-NEXT: [[TRUNC:%[0-9]+]]:_(s32) = G_TRUNC [[ICMP]](s64)
860 ; CHECK-NEXT: [[TRUNC1:%[0-9]+]]:_(s32) = G_TRUNC [[ICMP1]](s64)
861 ; CHECK-NEXT: [[SELECT:%[0-9]+]]:_(s32) = G_SELECT [[ICMP2]](s64), [[TRUNC]], [[TRUNC1]]
862 ; CHECK-NEXT: %z0:_(s64) = G_ANYEXT [[SELECT]](s32)
863 ; CHECK-NEXT: $x10 = COPY %z0(s64)
864 ; CHECK-NEXT: PseudoRET implicit $x10
865 %xhi:_(s64) = COPY $x10
866 %xlo:_(s64) = COPY $x11
867 %yhi:_(s64) = COPY $x12
868 %ylo:_(s64) = COPY $x13
869 %x0:_(s128) = G_MERGE_VALUES %xhi(s64), %xlo(s64)
870 %y0:_(s128) = G_MERGE_VALUES %yhi(s64), %ylo(s64)
871 %x:_(s72) = G_TRUNC %x0(s128)
872 %y:_(s72) = G_TRUNC %y0(s128)
873 %z:_(s1) = G_ICMP intpred(ugt), %x, %y
874 %z0:_(s64) = G_ANYEXT %z(s1)
876 PseudoRET implicit $x10
883 ; CHECK-LABEL: name: cmp_ugt_i128
884 ; CHECK: %xhi:_(s64) = COPY $x10
885 ; CHECK-NEXT: %xlo:_(s64) = COPY $x11
886 ; CHECK-NEXT: %yhi:_(s64) = COPY $x12
887 ; CHECK-NEXT: %ylo:_(s64) = COPY $x13
888 ; CHECK-NEXT: [[ICMP:%[0-9]+]]:_(s64) = G_ICMP intpred(ugt), %xhi(s64), %yhi
889 ; CHECK-NEXT: [[ICMP1:%[0-9]+]]:_(s64) = G_ICMP intpred(ugt), %xlo(s64), %ylo
890 ; CHECK-NEXT: [[ICMP2:%[0-9]+]]:_(s64) = G_ICMP intpred(eq), %xlo(s64), %ylo
891 ; CHECK-NEXT: [[TRUNC:%[0-9]+]]:_(s32) = G_TRUNC [[ICMP]](s64)
892 ; CHECK-NEXT: [[TRUNC1:%[0-9]+]]:_(s32) = G_TRUNC [[ICMP1]](s64)
893 ; CHECK-NEXT: [[SELECT:%[0-9]+]]:_(s32) = G_SELECT [[ICMP2]](s64), [[TRUNC]], [[TRUNC1]]
894 ; CHECK-NEXT: %z0:_(s64) = G_ANYEXT [[SELECT]](s32)
895 ; CHECK-NEXT: $x10 = COPY %z0(s64)
896 ; CHECK-NEXT: PseudoRET implicit $x10
897 %xhi:_(s64) = COPY $x10
898 %xlo:_(s64) = COPY $x11
899 %yhi:_(s64) = COPY $x12
900 %ylo:_(s64) = COPY $x13
901 %x:_(s128) = G_MERGE_VALUES %xhi(s64), %xlo(s64)
902 %y:_(s128) = G_MERGE_VALUES %yhi(s64), %ylo(s64)
903 %z:_(s1) = G_ICMP intpred(ugt), %x, %y
904 %z0:_(s64) = G_ANYEXT %z(s1)
906 PseudoRET implicit $x10
913 ; CHECK-LABEL: name: cmp_ult_i8
914 ; CHECK: [[COPY:%[0-9]+]]:_(s64) = COPY $x10
915 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:_(s64) = COPY $x11
916 ; CHECK-NEXT: [[C:%[0-9]+]]:_(s64) = G_CONSTANT i64 255
917 ; CHECK-NEXT: [[AND:%[0-9]+]]:_(s64) = G_AND [[COPY]], [[C]]
918 ; CHECK-NEXT: [[AND1:%[0-9]+]]:_(s64) = G_AND [[COPY1]], [[C]]
919 ; CHECK-NEXT: [[ICMP:%[0-9]+]]:_(s64) = G_ICMP intpred(ult), [[AND]](s64), [[AND1]]
920 ; CHECK-NEXT: $x10 = COPY [[ICMP]](s64)
921 ; CHECK-NEXT: PseudoRET implicit $x10
922 %0:_(s64) = COPY $x10
923 %1:_(s64) = COPY $x11
924 %2:_(s8) = G_TRUNC %0(s64)
925 %3:_(s8) = G_TRUNC %1(s64)
926 %4:_(s1) = G_ICMP intpred(ult), %2(s8), %3
927 %5:_(s64) = G_ANYEXT %4(s1)
929 PseudoRET implicit $x10
936 ; CHECK-LABEL: name: cmp_ult_i15
937 ; CHECK: [[COPY:%[0-9]+]]:_(s64) = COPY $x10
938 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:_(s64) = COPY $x11
939 ; CHECK-NEXT: [[C:%[0-9]+]]:_(s64) = G_CONSTANT i64 32767
940 ; CHECK-NEXT: [[AND:%[0-9]+]]:_(s64) = G_AND [[COPY]], [[C]]
941 ; CHECK-NEXT: [[AND1:%[0-9]+]]:_(s64) = G_AND [[COPY1]], [[C]]
942 ; CHECK-NEXT: [[ICMP:%[0-9]+]]:_(s64) = G_ICMP intpred(ult), [[AND]](s64), [[AND1]]
943 ; CHECK-NEXT: $x10 = COPY [[ICMP]](s64)
944 ; CHECK-NEXT: PseudoRET implicit $x10
945 %0:_(s64) = COPY $x10
946 %1:_(s64) = COPY $x11
947 %2:_(s15) = G_TRUNC %0(s64)
948 %3:_(s15) = G_TRUNC %1(s64)
949 %4:_(s1) = G_ICMP intpred(ult), %2(s15), %3
950 %5:_(s64) = G_ANYEXT %4(s1)
952 PseudoRET implicit $x10
959 ; CHECK-LABEL: name: cmp_ult_i16
960 ; CHECK: [[COPY:%[0-9]+]]:_(s64) = COPY $x10
961 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:_(s64) = COPY $x11
962 ; CHECK-NEXT: [[C:%[0-9]+]]:_(s64) = G_CONSTANT i64 65535
963 ; CHECK-NEXT: [[AND:%[0-9]+]]:_(s64) = G_AND [[COPY]], [[C]]
964 ; CHECK-NEXT: [[AND1:%[0-9]+]]:_(s64) = G_AND [[COPY1]], [[C]]
965 ; CHECK-NEXT: [[ICMP:%[0-9]+]]:_(s64) = G_ICMP intpred(ult), [[AND]](s64), [[AND1]]
966 ; CHECK-NEXT: $x10 = COPY [[ICMP]](s64)
967 ; CHECK-NEXT: PseudoRET implicit $x10
968 %0:_(s64) = COPY $x10
969 %1:_(s64) = COPY $x11
970 %2:_(s16) = G_TRUNC %0(s64)
971 %3:_(s16) = G_TRUNC %1(s64)
972 %4:_(s1) = G_ICMP intpred(ult), %2(s16), %3
973 %5:_(s64) = G_ANYEXT %4(s1)
975 PseudoRET implicit $x10
982 ; CHECK-LABEL: name: cmp_ult_i32
983 ; CHECK: [[COPY:%[0-9]+]]:_(s64) = COPY $x10
984 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:_(s64) = COPY $x11
985 ; CHECK-NEXT: [[SEXT_INREG:%[0-9]+]]:_(s64) = G_SEXT_INREG [[COPY]], 32
986 ; CHECK-NEXT: [[SEXT_INREG1:%[0-9]+]]:_(s64) = G_SEXT_INREG [[COPY1]], 32
987 ; CHECK-NEXT: [[ICMP:%[0-9]+]]:_(s64) = G_ICMP intpred(ult), [[SEXT_INREG]](s64), [[SEXT_INREG1]]
988 ; CHECK-NEXT: $x10 = COPY [[ICMP]](s64)
989 ; CHECK-NEXT: PseudoRET implicit $x10
990 %0:_(s64) = COPY $x10
991 %1:_(s64) = COPY $x11
992 %2:_(s32) = G_TRUNC %0(s64)
993 %3:_(s32) = G_TRUNC %1(s64)
994 %4:_(s1) = G_ICMP intpred(ult), %2(s32), %3
995 %5:_(s64) = G_ANYEXT %4(s1)
997 PseudoRET implicit $x10
1004 ; CHECK-LABEL: name: cmp_ult_i64
1005 ; CHECK: [[COPY:%[0-9]+]]:_(s64) = COPY $x10
1006 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:_(s64) = COPY $x11
1007 ; CHECK-NEXT: [[ICMP:%[0-9]+]]:_(s64) = G_ICMP intpred(ult), [[COPY]](s64), [[COPY1]]
1008 ; CHECK-NEXT: $x10 = COPY [[ICMP]](s64)
1009 ; CHECK-NEXT: PseudoRET implicit $x10
1010 %0:_(s64) = COPY $x10
1011 %1:_(s64) = COPY $x11
1012 %2:_(s1) = G_ICMP intpred(ult), %0(s64), %1
1013 %3:_(s64) = G_ANYEXT %2(s1)
1015 PseudoRET implicit $x10
1022 ; CHECK-LABEL: name: cmp_ult_i72
1023 ; CHECK: %xhi:_(s64) = COPY $x10
1024 ; CHECK-NEXT: %xlo:_(s64) = COPY $x11
1025 ; CHECK-NEXT: %yhi:_(s64) = COPY $x12
1026 ; CHECK-NEXT: %ylo:_(s64) = COPY $x13
1027 ; CHECK-NEXT: [[C:%[0-9]+]]:_(s64) = G_CONSTANT i64 -1
1028 ; CHECK-NEXT: [[C1:%[0-9]+]]:_(s64) = G_CONSTANT i64 255
1029 ; CHECK-NEXT: [[AND:%[0-9]+]]:_(s64) = G_AND %xhi, [[C]]
1030 ; CHECK-NEXT: [[AND1:%[0-9]+]]:_(s64) = G_AND %xlo, [[C1]]
1031 ; CHECK-NEXT: [[AND2:%[0-9]+]]:_(s64) = G_AND %yhi, [[C]]
1032 ; CHECK-NEXT: [[AND3:%[0-9]+]]:_(s64) = G_AND %ylo, [[C1]]
1033 ; CHECK-NEXT: [[ICMP:%[0-9]+]]:_(s64) = G_ICMP intpred(ult), [[AND]](s64), [[AND2]]
1034 ; CHECK-NEXT: [[ICMP1:%[0-9]+]]:_(s64) = G_ICMP intpred(ult), [[AND1]](s64), [[AND3]]
1035 ; CHECK-NEXT: [[ICMP2:%[0-9]+]]:_(s64) = G_ICMP intpred(eq), [[AND1]](s64), [[AND3]]
1036 ; CHECK-NEXT: [[TRUNC:%[0-9]+]]:_(s32) = G_TRUNC [[ICMP]](s64)
1037 ; CHECK-NEXT: [[TRUNC1:%[0-9]+]]:_(s32) = G_TRUNC [[ICMP1]](s64)
1038 ; CHECK-NEXT: [[SELECT:%[0-9]+]]:_(s32) = G_SELECT [[ICMP2]](s64), [[TRUNC]], [[TRUNC1]]
1039 ; CHECK-NEXT: %z0:_(s64) = G_ANYEXT [[SELECT]](s32)
1040 ; CHECK-NEXT: $x10 = COPY %z0(s64)
1041 ; CHECK-NEXT: PseudoRET implicit $x10
1042 %xhi:_(s64) = COPY $x10
1043 %xlo:_(s64) = COPY $x11
1044 %yhi:_(s64) = COPY $x12
1045 %ylo:_(s64) = COPY $x13
1046 %x0:_(s128) = G_MERGE_VALUES %xhi(s64), %xlo(s64)
1047 %y0:_(s128) = G_MERGE_VALUES %yhi(s64), %ylo(s64)
1048 %x:_(s72) = G_TRUNC %x0(s128)
1049 %y:_(s72) = G_TRUNC %y0(s128)
1050 %z:_(s1) = G_ICMP intpred(ult), %x, %y
1051 %z0:_(s64) = G_ANYEXT %z(s1)
1052 $x10 = COPY %z0(s64)
1053 PseudoRET implicit $x10
1060 ; CHECK-LABEL: name: cmp_ult_i128
1061 ; CHECK: %xhi:_(s64) = COPY $x10
1062 ; CHECK-NEXT: %xlo:_(s64) = COPY $x11
1063 ; CHECK-NEXT: %yhi:_(s64) = COPY $x12
1064 ; CHECK-NEXT: %ylo:_(s64) = COPY $x13
1065 ; CHECK-NEXT: [[ICMP:%[0-9]+]]:_(s64) = G_ICMP intpred(uge), %xhi(s64), %yhi
1066 ; CHECK-NEXT: [[ICMP1:%[0-9]+]]:_(s64) = G_ICMP intpred(sge), %xlo(s64), %ylo
1067 ; CHECK-NEXT: [[ICMP2:%[0-9]+]]:_(s64) = G_ICMP intpred(eq), %xlo(s64), %ylo
1068 ; CHECK-NEXT: [[TRUNC:%[0-9]+]]:_(s32) = G_TRUNC [[ICMP]](s64)
1069 ; CHECK-NEXT: [[TRUNC1:%[0-9]+]]:_(s32) = G_TRUNC [[ICMP1]](s64)
1070 ; CHECK-NEXT: [[SELECT:%[0-9]+]]:_(s32) = G_SELECT [[ICMP2]](s64), [[TRUNC]], [[TRUNC1]]
1071 ; CHECK-NEXT: %z0:_(s64) = G_ANYEXT [[SELECT]](s32)
1072 ; CHECK-NEXT: $x10 = COPY %z0(s64)
1073 ; CHECK-NEXT: PseudoRET implicit $x10
1074 %xhi:_(s64) = COPY $x10
1075 %xlo:_(s64) = COPY $x11
1076 %yhi:_(s64) = COPY $x12
1077 %ylo:_(s64) = COPY $x13
1078 %x:_(s128) = G_MERGE_VALUES %xhi(s64), %xlo(s64)
1079 %y:_(s128) = G_MERGE_VALUES %yhi(s64), %ylo(s64)
1080 %z:_(s1) = G_ICMP intpred(sge), %x, %y
1081 %z0:_(s64) = G_ANYEXT %z(s1)
1082 $x10 = COPY %z0(s64)
1083 PseudoRET implicit $x10
1090 ; CHECK-LABEL: name: cmp_uge_i8
1091 ; CHECK: [[COPY:%[0-9]+]]:_(s64) = COPY $x10
1092 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:_(s64) = COPY $x11
1093 ; CHECK-NEXT: [[C:%[0-9]+]]:_(s64) = G_CONSTANT i64 255
1094 ; CHECK-NEXT: [[AND:%[0-9]+]]:_(s64) = G_AND [[COPY]], [[C]]
1095 ; CHECK-NEXT: [[AND1:%[0-9]+]]:_(s64) = G_AND [[COPY1]], [[C]]
1096 ; CHECK-NEXT: [[ICMP:%[0-9]+]]:_(s64) = G_ICMP intpred(uge), [[AND]](s64), [[AND1]]
1097 ; CHECK-NEXT: $x10 = COPY [[ICMP]](s64)
1098 ; CHECK-NEXT: PseudoRET implicit $x10
1099 %0:_(s64) = COPY $x10
1100 %1:_(s64) = COPY $x11
1101 %2:_(s8) = G_TRUNC %0(s64)
1102 %3:_(s8) = G_TRUNC %1(s64)
1103 %4:_(s1) = G_ICMP intpred(uge), %2(s8), %3
1104 %5:_(s64) = G_ANYEXT %4(s1)
1106 PseudoRET implicit $x10
1113 ; CHECK-LABEL: name: cmp_uge_i15
1114 ; CHECK: [[COPY:%[0-9]+]]:_(s64) = COPY $x10
1115 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:_(s64) = COPY $x11
1116 ; CHECK-NEXT: [[C:%[0-9]+]]:_(s64) = G_CONSTANT i64 32767
1117 ; CHECK-NEXT: [[AND:%[0-9]+]]:_(s64) = G_AND [[COPY]], [[C]]
1118 ; CHECK-NEXT: [[AND1:%[0-9]+]]:_(s64) = G_AND [[COPY1]], [[C]]
1119 ; CHECK-NEXT: [[ICMP:%[0-9]+]]:_(s64) = G_ICMP intpred(uge), [[AND]](s64), [[AND1]]
1120 ; CHECK-NEXT: $x10 = COPY [[ICMP]](s64)
1121 ; CHECK-NEXT: PseudoRET implicit $x10
1122 %0:_(s64) = COPY $x10
1123 %1:_(s64) = COPY $x11
1124 %2:_(s15) = G_TRUNC %0(s64)
1125 %3:_(s15) = G_TRUNC %1(s64)
1126 %4:_(s1) = G_ICMP intpred(uge), %2(s15), %3
1127 %5:_(s64) = G_ANYEXT %4(s1)
1129 PseudoRET implicit $x10
1136 ; CHECK-LABEL: name: cmp_uge_i16
1137 ; CHECK: [[COPY:%[0-9]+]]:_(s64) = COPY $x10
1138 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:_(s64) = COPY $x11
1139 ; CHECK-NEXT: [[C:%[0-9]+]]:_(s64) = G_CONSTANT i64 65535
1140 ; CHECK-NEXT: [[AND:%[0-9]+]]:_(s64) = G_AND [[COPY]], [[C]]
1141 ; CHECK-NEXT: [[AND1:%[0-9]+]]:_(s64) = G_AND [[COPY1]], [[C]]
1142 ; CHECK-NEXT: [[ICMP:%[0-9]+]]:_(s64) = G_ICMP intpred(uge), [[AND]](s64), [[AND1]]
1143 ; CHECK-NEXT: $x10 = COPY [[ICMP]](s64)
1144 ; CHECK-NEXT: PseudoRET implicit $x10
1145 %0:_(s64) = COPY $x10
1146 %1:_(s64) = COPY $x11
1147 %2:_(s16) = G_TRUNC %0(s64)
1148 %3:_(s16) = G_TRUNC %1(s64)
1149 %4:_(s1) = G_ICMP intpred(uge), %2(s16), %3
1150 %5:_(s64) = G_ANYEXT %4(s1)
1152 PseudoRET implicit $x10
1159 ; CHECK-LABEL: name: cmp_uge_i32
1160 ; CHECK: [[COPY:%[0-9]+]]:_(s64) = COPY $x10
1161 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:_(s64) = COPY $x11
1162 ; CHECK-NEXT: [[SEXT_INREG:%[0-9]+]]:_(s64) = G_SEXT_INREG [[COPY]], 32
1163 ; CHECK-NEXT: [[SEXT_INREG1:%[0-9]+]]:_(s64) = G_SEXT_INREG [[COPY1]], 32
1164 ; CHECK-NEXT: [[ICMP:%[0-9]+]]:_(s64) = G_ICMP intpred(uge), [[SEXT_INREG]](s64), [[SEXT_INREG1]]
1165 ; CHECK-NEXT: $x10 = COPY [[ICMP]](s64)
1166 ; CHECK-NEXT: PseudoRET implicit $x10
1167 %0:_(s64) = COPY $x10
1168 %1:_(s64) = COPY $x11
1169 %2:_(s32) = G_TRUNC %0(s64)
1170 %3:_(s32) = G_TRUNC %1(s64)
1171 %4:_(s1) = G_ICMP intpred(uge), %2(s32), %3
1172 %5:_(s64) = G_ANYEXT %4(s1)
1174 PseudoRET implicit $x10
1181 ; CHECK-LABEL: name: cmp_uge_i64
1182 ; CHECK: [[COPY:%[0-9]+]]:_(s64) = COPY $x10
1183 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:_(s64) = COPY $x11
1184 ; CHECK-NEXT: [[ICMP:%[0-9]+]]:_(s64) = G_ICMP intpred(uge), [[COPY]](s64), [[COPY1]]
1185 ; CHECK-NEXT: $x10 = COPY [[ICMP]](s64)
1186 ; CHECK-NEXT: PseudoRET implicit $x10
1187 %0:_(s64) = COPY $x10
1188 %1:_(s64) = COPY $x11
1189 %2:_(s1) = G_ICMP intpred(uge), %0(s64), %1
1190 %3:_(s64) = G_ANYEXT %2(s1)
1192 PseudoRET implicit $x10
1199 ; CHECK-LABEL: name: cmp_uge_i72
1200 ; CHECK: %xhi:_(s64) = COPY $x10
1201 ; CHECK-NEXT: %xlo:_(s64) = COPY $x11
1202 ; CHECK-NEXT: %yhi:_(s64) = COPY $x12
1203 ; CHECK-NEXT: %ylo:_(s64) = COPY $x13
1204 ; CHECK-NEXT: [[C:%[0-9]+]]:_(s64) = G_CONSTANT i64 -1
1205 ; CHECK-NEXT: [[C1:%[0-9]+]]:_(s64) = G_CONSTANT i64 255
1206 ; CHECK-NEXT: [[AND:%[0-9]+]]:_(s64) = G_AND %xhi, [[C]]
1207 ; CHECK-NEXT: [[AND1:%[0-9]+]]:_(s64) = G_AND %xlo, [[C1]]
1208 ; CHECK-NEXT: [[AND2:%[0-9]+]]:_(s64) = G_AND %yhi, [[C]]
1209 ; CHECK-NEXT: [[AND3:%[0-9]+]]:_(s64) = G_AND %ylo, [[C1]]
1210 ; CHECK-NEXT: [[ICMP:%[0-9]+]]:_(s64) = G_ICMP intpred(uge), [[AND]](s64), [[AND2]]
1211 ; CHECK-NEXT: [[ICMP1:%[0-9]+]]:_(s64) = G_ICMP intpred(uge), [[AND1]](s64), [[AND3]]
1212 ; CHECK-NEXT: [[ICMP2:%[0-9]+]]:_(s64) = G_ICMP intpred(eq), [[AND1]](s64), [[AND3]]
1213 ; CHECK-NEXT: [[TRUNC:%[0-9]+]]:_(s32) = G_TRUNC [[ICMP]](s64)
1214 ; CHECK-NEXT: [[TRUNC1:%[0-9]+]]:_(s32) = G_TRUNC [[ICMP1]](s64)
1215 ; CHECK-NEXT: [[SELECT:%[0-9]+]]:_(s32) = G_SELECT [[ICMP2]](s64), [[TRUNC]], [[TRUNC1]]
1216 ; CHECK-NEXT: %z0:_(s64) = G_ANYEXT [[SELECT]](s32)
1217 ; CHECK-NEXT: $x10 = COPY %z0(s64)
1218 ; CHECK-NEXT: PseudoRET implicit $x10
1219 %xhi:_(s64) = COPY $x10
1220 %xlo:_(s64) = COPY $x11
1221 %yhi:_(s64) = COPY $x12
1222 %ylo:_(s64) = COPY $x13
1223 %x0:_(s128) = G_MERGE_VALUES %xhi(s64), %xlo(s64)
1224 %y0:_(s128) = G_MERGE_VALUES %yhi(s64), %ylo(s64)
1225 %x:_(s72) = G_TRUNC %x0(s128)
1226 %y:_(s72) = G_TRUNC %y0(s128)
1227 %z:_(s1) = G_ICMP intpred(uge), %x, %y
1228 %z0:_(s64) = G_ANYEXT %z(s1)
1229 $x10 = COPY %z0(s64)
1230 PseudoRET implicit $x10
1237 ; CHECK-LABEL: name: cmp_uge_i128
1238 ; CHECK: %xhi:_(s64) = COPY $x10
1239 ; CHECK-NEXT: %xlo:_(s64) = COPY $x11
1240 ; CHECK-NEXT: %yhi:_(s64) = COPY $x12
1241 ; CHECK-NEXT: %ylo:_(s64) = COPY $x13
1242 ; CHECK-NEXT: [[ICMP:%[0-9]+]]:_(s64) = G_ICMP intpred(uge), %xhi(s64), %yhi
1243 ; CHECK-NEXT: [[ICMP1:%[0-9]+]]:_(s64) = G_ICMP intpred(uge), %xlo(s64), %ylo
1244 ; CHECK-NEXT: [[ICMP2:%[0-9]+]]:_(s64) = G_ICMP intpred(eq), %xlo(s64), %ylo
1245 ; CHECK-NEXT: [[TRUNC:%[0-9]+]]:_(s32) = G_TRUNC [[ICMP]](s64)
1246 ; CHECK-NEXT: [[TRUNC1:%[0-9]+]]:_(s32) = G_TRUNC [[ICMP1]](s64)
1247 ; CHECK-NEXT: [[SELECT:%[0-9]+]]:_(s32) = G_SELECT [[ICMP2]](s64), [[TRUNC]], [[TRUNC1]]
1248 ; CHECK-NEXT: %z0:_(s64) = G_ANYEXT [[SELECT]](s32)
1249 ; CHECK-NEXT: $x10 = COPY %z0(s64)
1250 ; CHECK-NEXT: PseudoRET implicit $x10
1251 %xhi:_(s64) = COPY $x10
1252 %xlo:_(s64) = COPY $x11
1253 %yhi:_(s64) = COPY $x12
1254 %ylo:_(s64) = COPY $x13
1255 %x:_(s128) = G_MERGE_VALUES %xhi(s64), %xlo(s64)
1256 %y:_(s128) = G_MERGE_VALUES %yhi(s64), %ylo(s64)
1257 %z:_(s1) = G_ICMP intpred(uge), %x, %y
1258 %z0:_(s64) = G_ANYEXT %z(s1)
1259 $x10 = COPY %z0(s64)
1260 PseudoRET implicit $x10
1267 ; CHECK-LABEL: name: cmp_ule_i8
1268 ; CHECK: [[COPY:%[0-9]+]]:_(s64) = COPY $x10
1269 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:_(s64) = COPY $x11
1270 ; CHECK-NEXT: [[C:%[0-9]+]]:_(s64) = G_CONSTANT i64 255
1271 ; CHECK-NEXT: [[AND:%[0-9]+]]:_(s64) = G_AND [[COPY]], [[C]]
1272 ; CHECK-NEXT: [[AND1:%[0-9]+]]:_(s64) = G_AND [[COPY1]], [[C]]
1273 ; CHECK-NEXT: [[ICMP:%[0-9]+]]:_(s64) = G_ICMP intpred(ule), [[AND]](s64), [[AND1]]
1274 ; CHECK-NEXT: $x10 = COPY [[ICMP]](s64)
1275 ; CHECK-NEXT: PseudoRET implicit $x10
1276 %0:_(s64) = COPY $x10
1277 %1:_(s64) = COPY $x11
1278 %2:_(s8) = G_TRUNC %0(s64)
1279 %3:_(s8) = G_TRUNC %1(s64)
1280 %4:_(s1) = G_ICMP intpred(ule), %2(s8), %3
1281 %5:_(s64) = G_ANYEXT %4(s1)
1283 PseudoRET implicit $x10
1290 ; CHECK-LABEL: name: cmp_ule_i15
1291 ; CHECK: [[COPY:%[0-9]+]]:_(s64) = COPY $x10
1292 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:_(s64) = COPY $x11
1293 ; CHECK-NEXT: [[C:%[0-9]+]]:_(s64) = G_CONSTANT i64 32767
1294 ; CHECK-NEXT: [[AND:%[0-9]+]]:_(s64) = G_AND [[COPY]], [[C]]
1295 ; CHECK-NEXT: [[AND1:%[0-9]+]]:_(s64) = G_AND [[COPY1]], [[C]]
1296 ; CHECK-NEXT: [[ICMP:%[0-9]+]]:_(s64) = G_ICMP intpred(ule), [[AND]](s64), [[AND1]]
1297 ; CHECK-NEXT: $x10 = COPY [[ICMP]](s64)
1298 ; CHECK-NEXT: PseudoRET implicit $x10
1299 %0:_(s64) = COPY $x10
1300 %1:_(s64) = COPY $x11
1301 %2:_(s15) = G_TRUNC %0(s64)
1302 %3:_(s15) = G_TRUNC %1(s64)
1303 %4:_(s1) = G_ICMP intpred(ule), %2(s15), %3
1304 %5:_(s64) = G_ANYEXT %4(s1)
1306 PseudoRET implicit $x10
1313 ; CHECK-LABEL: name: cmp_ule_i16
1314 ; CHECK: [[COPY:%[0-9]+]]:_(s64) = COPY $x10
1315 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:_(s64) = COPY $x11
1316 ; CHECK-NEXT: [[C:%[0-9]+]]:_(s64) = G_CONSTANT i64 65535
1317 ; CHECK-NEXT: [[AND:%[0-9]+]]:_(s64) = G_AND [[COPY]], [[C]]
1318 ; CHECK-NEXT: [[AND1:%[0-9]+]]:_(s64) = G_AND [[COPY1]], [[C]]
1319 ; CHECK-NEXT: [[ICMP:%[0-9]+]]:_(s64) = G_ICMP intpred(ule), [[AND]](s64), [[AND1]]
1320 ; CHECK-NEXT: $x10 = COPY [[ICMP]](s64)
1321 ; CHECK-NEXT: PseudoRET implicit $x10
1322 %0:_(s64) = COPY $x10
1323 %1:_(s64) = COPY $x11
1324 %2:_(s16) = G_TRUNC %0(s64)
1325 %3:_(s16) = G_TRUNC %1(s64)
1326 %4:_(s1) = G_ICMP intpred(ule), %2(s16), %3
1327 %5:_(s64) = G_ANYEXT %4(s1)
1329 PseudoRET implicit $x10
1336 ; CHECK-LABEL: name: cmp_ule_i32
1337 ; CHECK: [[COPY:%[0-9]+]]:_(s64) = COPY $x10
1338 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:_(s64) = COPY $x11
1339 ; CHECK-NEXT: [[SEXT_INREG:%[0-9]+]]:_(s64) = G_SEXT_INREG [[COPY]], 32
1340 ; CHECK-NEXT: [[SEXT_INREG1:%[0-9]+]]:_(s64) = G_SEXT_INREG [[COPY1]], 32
1341 ; CHECK-NEXT: [[ICMP:%[0-9]+]]:_(s64) = G_ICMP intpred(ule), [[SEXT_INREG]](s64), [[SEXT_INREG1]]
1342 ; CHECK-NEXT: $x10 = COPY [[ICMP]](s64)
1343 ; CHECK-NEXT: PseudoRET implicit $x10
1344 %0:_(s64) = COPY $x10
1345 %1:_(s64) = COPY $x11
1346 %2:_(s32) = G_TRUNC %0(s64)
1347 %3:_(s32) = G_TRUNC %1(s64)
1348 %4:_(s1) = G_ICMP intpred(ule), %2(s32), %3
1349 %5:_(s64) = G_ANYEXT %4(s1)
1351 PseudoRET implicit $x10
1358 ; CHECK-LABEL: name: cmp_ule_i64
1359 ; CHECK: [[COPY:%[0-9]+]]:_(s64) = COPY $x10
1360 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:_(s64) = COPY $x11
1361 ; CHECK-NEXT: [[ICMP:%[0-9]+]]:_(s64) = G_ICMP intpred(ule), [[COPY]](s64), [[COPY1]]
1362 ; CHECK-NEXT: $x10 = COPY [[ICMP]](s64)
1363 ; CHECK-NEXT: PseudoRET implicit $x10
1364 %0:_(s64) = COPY $x10
1365 %1:_(s64) = COPY $x11
1366 %2:_(s1) = G_ICMP intpred(ule), %0(s64), %1
1367 %3:_(s64) = G_ANYEXT %2(s1)
1369 PseudoRET implicit $x10
1376 ; CHECK-LABEL: name: cmp_ule_i72
1377 ; CHECK: %xhi:_(s64) = COPY $x10
1378 ; CHECK-NEXT: %xlo:_(s64) = COPY $x11
1379 ; CHECK-NEXT: %yhi:_(s64) = COPY $x12
1380 ; CHECK-NEXT: %ylo:_(s64) = COPY $x13
1381 ; CHECK-NEXT: [[C:%[0-9]+]]:_(s64) = G_CONSTANT i64 -1
1382 ; CHECK-NEXT: [[C1:%[0-9]+]]:_(s64) = G_CONSTANT i64 255
1383 ; CHECK-NEXT: [[AND:%[0-9]+]]:_(s64) = G_AND %xhi, [[C]]
1384 ; CHECK-NEXT: [[AND1:%[0-9]+]]:_(s64) = G_AND %xlo, [[C1]]
1385 ; CHECK-NEXT: [[AND2:%[0-9]+]]:_(s64) = G_AND %yhi, [[C]]
1386 ; CHECK-NEXT: [[AND3:%[0-9]+]]:_(s64) = G_AND %ylo, [[C1]]
1387 ; CHECK-NEXT: [[ICMP:%[0-9]+]]:_(s64) = G_ICMP intpred(ule), [[AND]](s64), [[AND2]]
1388 ; CHECK-NEXT: [[ICMP1:%[0-9]+]]:_(s64) = G_ICMP intpred(ule), [[AND1]](s64), [[AND3]]
1389 ; CHECK-NEXT: [[ICMP2:%[0-9]+]]:_(s64) = G_ICMP intpred(eq), [[AND1]](s64), [[AND3]]
1390 ; CHECK-NEXT: [[TRUNC:%[0-9]+]]:_(s32) = G_TRUNC [[ICMP]](s64)
1391 ; CHECK-NEXT: [[TRUNC1:%[0-9]+]]:_(s32) = G_TRUNC [[ICMP1]](s64)
1392 ; CHECK-NEXT: [[SELECT:%[0-9]+]]:_(s32) = G_SELECT [[ICMP2]](s64), [[TRUNC]], [[TRUNC1]]
1393 ; CHECK-NEXT: %z0:_(s64) = G_ANYEXT [[SELECT]](s32)
1394 ; CHECK-NEXT: $x10 = COPY %z0(s64)
1395 ; CHECK-NEXT: PseudoRET implicit $x10
1396 %xhi:_(s64) = COPY $x10
1397 %xlo:_(s64) = COPY $x11
1398 %yhi:_(s64) = COPY $x12
1399 %ylo:_(s64) = COPY $x13
1400 %x0:_(s128) = G_MERGE_VALUES %xhi(s64), %xlo(s64)
1401 %y0:_(s128) = G_MERGE_VALUES %yhi(s64), %ylo(s64)
1402 %x:_(s72) = G_TRUNC %x0(s128)
1403 %y:_(s72) = G_TRUNC %y0(s128)
1404 %z:_(s1) = G_ICMP intpred(ule), %x, %y
1405 %z0:_(s64) = G_ANYEXT %z(s1)
1406 $x10 = COPY %z0(s64)
1407 PseudoRET implicit $x10
1414 ; CHECK-LABEL: name: cmp_ule_i128
1415 ; CHECK: %xhi:_(s64) = COPY $x10
1416 ; CHECK-NEXT: %xlo:_(s64) = COPY $x11
1417 ; CHECK-NEXT: %yhi:_(s64) = COPY $x12
1418 ; CHECK-NEXT: %ylo:_(s64) = COPY $x13
1419 ; CHECK-NEXT: [[ICMP:%[0-9]+]]:_(s64) = G_ICMP intpred(ule), %xhi(s64), %yhi
1420 ; CHECK-NEXT: [[ICMP1:%[0-9]+]]:_(s64) = G_ICMP intpred(ule), %xlo(s64), %ylo
1421 ; CHECK-NEXT: [[ICMP2:%[0-9]+]]:_(s64) = G_ICMP intpred(eq), %xlo(s64), %ylo
1422 ; CHECK-NEXT: [[TRUNC:%[0-9]+]]:_(s32) = G_TRUNC [[ICMP]](s64)
1423 ; CHECK-NEXT: [[TRUNC1:%[0-9]+]]:_(s32) = G_TRUNC [[ICMP1]](s64)
1424 ; CHECK-NEXT: [[SELECT:%[0-9]+]]:_(s32) = G_SELECT [[ICMP2]](s64), [[TRUNC]], [[TRUNC1]]
1425 ; CHECK-NEXT: %z0:_(s64) = G_ANYEXT [[SELECT]](s32)
1426 ; CHECK-NEXT: $x10 = COPY %z0(s64)
1427 ; CHECK-NEXT: PseudoRET implicit $x10
1428 %xhi:_(s64) = COPY $x10
1429 %xlo:_(s64) = COPY $x11
1430 %yhi:_(s64) = COPY $x12
1431 %ylo:_(s64) = COPY $x13
1432 %x:_(s128) = G_MERGE_VALUES %xhi(s64), %xlo(s64)
1433 %y:_(s128) = G_MERGE_VALUES %yhi(s64), %ylo(s64)
1434 %z:_(s1) = G_ICMP intpred(ule), %x, %y
1435 %z0:_(s64) = G_ANYEXT %z(s1)
1436 $x10 = COPY %z0(s64)
1437 PseudoRET implicit $x10
1444 ; CHECK-LABEL: name: cmp_eq_i8
1445 ; CHECK: [[COPY:%[0-9]+]]:_(s64) = COPY $x10
1446 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:_(s64) = COPY $x11
1447 ; CHECK-NEXT: [[C:%[0-9]+]]:_(s64) = G_CONSTANT i64 255
1448 ; CHECK-NEXT: [[AND:%[0-9]+]]:_(s64) = G_AND [[COPY]], [[C]]
1449 ; CHECK-NEXT: [[AND1:%[0-9]+]]:_(s64) = G_AND [[COPY1]], [[C]]
1450 ; CHECK-NEXT: [[ICMP:%[0-9]+]]:_(s64) = G_ICMP intpred(eq), [[AND]](s64), [[AND1]]
1451 ; CHECK-NEXT: $x10 = COPY [[ICMP]](s64)
1452 ; CHECK-NEXT: PseudoRET implicit $x10
1453 %0:_(s64) = COPY $x10
1454 %1:_(s64) = COPY $x11
1455 %2:_(s8) = G_TRUNC %0(s64)
1456 %3:_(s8) = G_TRUNC %1(s64)
1457 %4:_(s1) = G_ICMP intpred(eq), %2(s8), %3
1458 %5:_(s64) = G_ANYEXT %4(s1)
1460 PseudoRET implicit $x10
1467 ; CHECK-LABEL: name: cmp_eq_i15
1468 ; CHECK: [[COPY:%[0-9]+]]:_(s64) = COPY $x10
1469 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:_(s64) = COPY $x11
1470 ; CHECK-NEXT: [[C:%[0-9]+]]:_(s64) = G_CONSTANT i64 32767
1471 ; CHECK-NEXT: [[AND:%[0-9]+]]:_(s64) = G_AND [[COPY]], [[C]]
1472 ; CHECK-NEXT: [[AND1:%[0-9]+]]:_(s64) = G_AND [[COPY1]], [[C]]
1473 ; CHECK-NEXT: [[ICMP:%[0-9]+]]:_(s64) = G_ICMP intpred(eq), [[AND]](s64), [[AND1]]
1474 ; CHECK-NEXT: $x10 = COPY [[ICMP]](s64)
1475 ; CHECK-NEXT: PseudoRET implicit $x10
1476 %0:_(s64) = COPY $x10
1477 %1:_(s64) = COPY $x11
1478 %2:_(s15) = G_TRUNC %0(s64)
1479 %3:_(s15) = G_TRUNC %1(s64)
1480 %4:_(s1) = G_ICMP intpred(eq), %2(s15), %3
1481 %5:_(s64) = G_ANYEXT %4(s1)
1483 PseudoRET implicit $x10
1490 ; CHECK-LABEL: name: cmp_eq_i16
1491 ; CHECK: [[COPY:%[0-9]+]]:_(s64) = COPY $x10
1492 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:_(s64) = COPY $x11
1493 ; CHECK-NEXT: [[C:%[0-9]+]]:_(s64) = G_CONSTANT i64 65535
1494 ; CHECK-NEXT: [[AND:%[0-9]+]]:_(s64) = G_AND [[COPY]], [[C]]
1495 ; CHECK-NEXT: [[AND1:%[0-9]+]]:_(s64) = G_AND [[COPY1]], [[C]]
1496 ; CHECK-NEXT: [[ICMP:%[0-9]+]]:_(s64) = G_ICMP intpred(eq), [[AND]](s64), [[AND1]]
1497 ; CHECK-NEXT: $x10 = COPY [[ICMP]](s64)
1498 ; CHECK-NEXT: PseudoRET implicit $x10
1499 %0:_(s64) = COPY $x10
1500 %1:_(s64) = COPY $x11
1501 %2:_(s16) = G_TRUNC %0(s64)
1502 %3:_(s16) = G_TRUNC %1(s64)
1503 %4:_(s1) = G_ICMP intpred(eq), %2(s16), %3
1504 %5:_(s64) = G_ANYEXT %4(s1)
1506 PseudoRET implicit $x10
1513 ; CHECK-LABEL: name: cmp_eq_i32
1514 ; CHECK: [[COPY:%[0-9]+]]:_(s64) = COPY $x10
1515 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:_(s64) = COPY $x11
1516 ; CHECK-NEXT: [[SEXT_INREG:%[0-9]+]]:_(s64) = G_SEXT_INREG [[COPY]], 32
1517 ; CHECK-NEXT: [[SEXT_INREG1:%[0-9]+]]:_(s64) = G_SEXT_INREG [[COPY1]], 32
1518 ; CHECK-NEXT: [[ICMP:%[0-9]+]]:_(s64) = G_ICMP intpred(eq), [[SEXT_INREG]](s64), [[SEXT_INREG1]]
1519 ; CHECK-NEXT: $x10 = COPY [[ICMP]](s64)
1520 ; CHECK-NEXT: PseudoRET implicit $x10
1521 %0:_(s64) = COPY $x10
1522 %1:_(s64) = COPY $x11
1523 %2:_(s32) = G_TRUNC %0(s64)
1524 %3:_(s32) = G_TRUNC %1(s64)
1525 %4:_(s1) = G_ICMP intpred(eq), %2(s32), %3
1526 %5:_(s64) = G_ANYEXT %4(s1)
1528 PseudoRET implicit $x10
1535 ; CHECK-LABEL: name: cmp_eq_i64
1536 ; CHECK: [[COPY:%[0-9]+]]:_(s64) = COPY $x10
1537 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:_(s64) = COPY $x11
1538 ; CHECK-NEXT: [[ICMP:%[0-9]+]]:_(s64) = G_ICMP intpred(eq), [[COPY]](s64), [[COPY1]]
1539 ; CHECK-NEXT: $x10 = COPY [[ICMP]](s64)
1540 ; CHECK-NEXT: PseudoRET implicit $x10
1541 %0:_(s64) = COPY $x10
1542 %1:_(s64) = COPY $x11
1543 %2:_(s1) = G_ICMP intpred(eq), %0(s64), %1
1544 %3:_(s64) = G_ANYEXT %2(s1)
1546 PseudoRET implicit $x10
1553 ; CHECK-LABEL: name: cmp_eq_i72
1554 ; CHECK: %xhi:_(s64) = COPY $x10
1555 ; CHECK-NEXT: %xlo:_(s64) = COPY $x11
1556 ; CHECK-NEXT: %yhi:_(s64) = COPY $x12
1557 ; CHECK-NEXT: %ylo:_(s64) = COPY $x13
1558 ; CHECK-NEXT: [[C:%[0-9]+]]:_(s64) = G_CONSTANT i64 -1
1559 ; CHECK-NEXT: [[C1:%[0-9]+]]:_(s64) = G_CONSTANT i64 255
1560 ; CHECK-NEXT: [[AND:%[0-9]+]]:_(s64) = G_AND %xhi, [[C]]
1561 ; CHECK-NEXT: [[AND1:%[0-9]+]]:_(s64) = G_AND %xlo, [[C1]]
1562 ; CHECK-NEXT: [[AND2:%[0-9]+]]:_(s64) = G_AND %yhi, [[C]]
1563 ; CHECK-NEXT: [[AND3:%[0-9]+]]:_(s64) = G_AND %ylo, [[C1]]
1564 ; CHECK-NEXT: [[C2:%[0-9]+]]:_(s64) = G_CONSTANT i64 0
1565 ; CHECK-NEXT: [[XOR:%[0-9]+]]:_(s64) = G_XOR [[AND]], [[AND2]]
1566 ; CHECK-NEXT: [[XOR1:%[0-9]+]]:_(s64) = G_XOR [[AND1]], [[AND3]]
1567 ; CHECK-NEXT: [[OR:%[0-9]+]]:_(s64) = G_OR [[XOR]], [[XOR1]]
1568 ; CHECK-NEXT: [[ICMP:%[0-9]+]]:_(s64) = G_ICMP intpred(eq), [[OR]](s64), [[C2]]
1569 ; CHECK-NEXT: $x10 = COPY [[ICMP]](s64)
1570 ; CHECK-NEXT: PseudoRET implicit $x10
1571 %xhi:_(s64) = COPY $x10
1572 %xlo:_(s64) = COPY $x11
1573 %yhi:_(s64) = COPY $x12
1574 %ylo:_(s64) = COPY $x13
1575 %x0:_(s128) = G_MERGE_VALUES %xhi(s64), %xlo(s64)
1576 %y0:_(s128) = G_MERGE_VALUES %yhi(s64), %ylo(s64)
1577 %x:_(s72) = G_TRUNC %x0(s128)
1578 %y:_(s72) = G_TRUNC %y0(s128)
1579 %z:_(s1) = G_ICMP intpred(eq), %x, %y
1580 %z0:_(s64) = G_ANYEXT %z(s1)
1581 $x10 = COPY %z0(s64)
1582 PseudoRET implicit $x10
1589 ; CHECK-LABEL: name: cmp_eq_i128
1590 ; CHECK: %xhi:_(s64) = COPY $x10
1591 ; CHECK-NEXT: %xlo:_(s64) = COPY $x11
1592 ; CHECK-NEXT: %yhi:_(s64) = COPY $x12
1593 ; CHECK-NEXT: %ylo:_(s64) = COPY $x13
1594 ; CHECK-NEXT: [[C:%[0-9]+]]:_(s64) = G_CONSTANT i64 0
1595 ; CHECK-NEXT: [[XOR:%[0-9]+]]:_(s64) = G_XOR %xhi, %yhi
1596 ; CHECK-NEXT: [[XOR1:%[0-9]+]]:_(s64) = G_XOR %xlo, %ylo
1597 ; CHECK-NEXT: [[OR:%[0-9]+]]:_(s64) = G_OR [[XOR]], [[XOR1]]
1598 ; CHECK-NEXT: [[ICMP:%[0-9]+]]:_(s64) = G_ICMP intpred(eq), [[OR]](s64), [[C]]
1599 ; CHECK-NEXT: $x10 = COPY [[ICMP]](s64)
1600 ; CHECK-NEXT: PseudoRET implicit $x10
1601 %xhi:_(s64) = COPY $x10
1602 %xlo:_(s64) = COPY $x11
1603 %yhi:_(s64) = COPY $x12
1604 %ylo:_(s64) = COPY $x13
1605 %x:_(s128) = G_MERGE_VALUES %xhi(s64), %xlo(s64)
1606 %y:_(s128) = G_MERGE_VALUES %yhi(s64), %ylo(s64)
1607 %z:_(s1) = G_ICMP intpred(eq), %x, %y
1608 %z0:_(s64) = G_ANYEXT %z(s1)
1609 $x10 = COPY %z0(s64)
1610 PseudoRET implicit $x10
1617 ; CHECK-LABEL: name: cmp_ne_i8
1618 ; CHECK: [[COPY:%[0-9]+]]:_(s64) = COPY $x10
1619 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:_(s64) = COPY $x11
1620 ; CHECK-NEXT: [[C:%[0-9]+]]:_(s64) = G_CONSTANT i64 255
1621 ; CHECK-NEXT: [[AND:%[0-9]+]]:_(s64) = G_AND [[COPY]], [[C]]
1622 ; CHECK-NEXT: [[AND1:%[0-9]+]]:_(s64) = G_AND [[COPY1]], [[C]]
1623 ; CHECK-NEXT: [[ICMP:%[0-9]+]]:_(s64) = G_ICMP intpred(ne), [[AND]](s64), [[AND1]]
1624 ; CHECK-NEXT: $x10 = COPY [[ICMP]](s64)
1625 ; CHECK-NEXT: PseudoRET implicit $x10
1626 %0:_(s64) = COPY $x10
1627 %1:_(s64) = COPY $x11
1628 %2:_(s8) = G_TRUNC %0(s64)
1629 %3:_(s8) = G_TRUNC %1(s64)
1630 %4:_(s1) = G_ICMP intpred(ne), %2(s8), %3
1631 %5:_(s64) = G_ANYEXT %4(s1)
1633 PseudoRET implicit $x10
1640 ; CHECK-LABEL: name: cmp_ne_i15
1641 ; CHECK: [[COPY:%[0-9]+]]:_(s64) = COPY $x10
1642 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:_(s64) = COPY $x11
1643 ; CHECK-NEXT: [[C:%[0-9]+]]:_(s64) = G_CONSTANT i64 32767
1644 ; CHECK-NEXT: [[AND:%[0-9]+]]:_(s64) = G_AND [[COPY]], [[C]]
1645 ; CHECK-NEXT: [[AND1:%[0-9]+]]:_(s64) = G_AND [[COPY1]], [[C]]
1646 ; CHECK-NEXT: [[ICMP:%[0-9]+]]:_(s64) = G_ICMP intpred(ne), [[AND]](s64), [[AND1]]
1647 ; CHECK-NEXT: $x10 = COPY [[ICMP]](s64)
1648 ; CHECK-NEXT: PseudoRET implicit $x10
1649 %0:_(s64) = COPY $x10
1650 %1:_(s64) = COPY $x11
1651 %2:_(s15) = G_TRUNC %0(s64)
1652 %3:_(s15) = G_TRUNC %1(s64)
1653 %4:_(s1) = G_ICMP intpred(ne), %2(s15), %3
1654 %5:_(s64) = G_ANYEXT %4(s1)
1656 PseudoRET implicit $x10
1663 ; CHECK-LABEL: name: cmp_ne_i16
1664 ; CHECK: [[COPY:%[0-9]+]]:_(s64) = COPY $x10
1665 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:_(s64) = COPY $x11
1666 ; CHECK-NEXT: [[C:%[0-9]+]]:_(s64) = G_CONSTANT i64 65535
1667 ; CHECK-NEXT: [[AND:%[0-9]+]]:_(s64) = G_AND [[COPY]], [[C]]
1668 ; CHECK-NEXT: [[AND1:%[0-9]+]]:_(s64) = G_AND [[COPY1]], [[C]]
1669 ; CHECK-NEXT: [[ICMP:%[0-9]+]]:_(s64) = G_ICMP intpred(ne), [[AND]](s64), [[AND1]]
1670 ; CHECK-NEXT: $x10 = COPY [[ICMP]](s64)
1671 ; CHECK-NEXT: PseudoRET implicit $x10
1672 %0:_(s64) = COPY $x10
1673 %1:_(s64) = COPY $x11
1674 %2:_(s16) = G_TRUNC %0(s64)
1675 %3:_(s16) = G_TRUNC %1(s64)
1676 %4:_(s1) = G_ICMP intpred(ne), %2(s16), %3
1677 %5:_(s64) = G_ANYEXT %4(s1)
1679 PseudoRET implicit $x10
1686 ; CHECK-LABEL: name: cmp_ne_i32
1687 ; CHECK: [[COPY:%[0-9]+]]:_(s64) = COPY $x10
1688 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:_(s64) = COPY $x11
1689 ; CHECK-NEXT: [[SEXT_INREG:%[0-9]+]]:_(s64) = G_SEXT_INREG [[COPY]], 32
1690 ; CHECK-NEXT: [[SEXT_INREG1:%[0-9]+]]:_(s64) = G_SEXT_INREG [[COPY1]], 32
1691 ; CHECK-NEXT: [[ICMP:%[0-9]+]]:_(s64) = G_ICMP intpred(ne), [[SEXT_INREG]](s64), [[SEXT_INREG1]]
1692 ; CHECK-NEXT: $x10 = COPY [[ICMP]](s64)
1693 ; CHECK-NEXT: PseudoRET implicit $x10
1694 %0:_(s64) = COPY $x10
1695 %1:_(s64) = COPY $x11
1696 %2:_(s32) = G_TRUNC %0(s64)
1697 %3:_(s32) = G_TRUNC %1(s64)
1698 %4:_(s1) = G_ICMP intpred(ne), %2(s32), %3
1699 %5:_(s64) = G_ANYEXT %4(s1)
1701 PseudoRET implicit $x10
1708 ; CHECK-LABEL: name: cmp_ne_i64
1709 ; CHECK: [[COPY:%[0-9]+]]:_(s64) = COPY $x10
1710 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:_(s64) = COPY $x11
1711 ; CHECK-NEXT: [[ICMP:%[0-9]+]]:_(s64) = G_ICMP intpred(ne), [[COPY]](s64), [[COPY1]]
1712 ; CHECK-NEXT: $x10 = COPY [[ICMP]](s64)
1713 ; CHECK-NEXT: PseudoRET implicit $x10
1714 %0:_(s64) = COPY $x10
1715 %1:_(s64) = COPY $x11
1716 %2:_(s1) = G_ICMP intpred(ne), %0(s64), %1
1717 %3:_(s64) = G_ANYEXT %2(s1)
1719 PseudoRET implicit $x10
1726 ; CHECK-LABEL: name: cmp_ne_i72
1727 ; CHECK: %xhi:_(s64) = COPY $x10
1728 ; CHECK-NEXT: %xlo:_(s64) = COPY $x11
1729 ; CHECK-NEXT: %yhi:_(s64) = COPY $x12
1730 ; CHECK-NEXT: %ylo:_(s64) = COPY $x13
1731 ; CHECK-NEXT: [[C:%[0-9]+]]:_(s64) = G_CONSTANT i64 -1
1732 ; CHECK-NEXT: [[C1:%[0-9]+]]:_(s64) = G_CONSTANT i64 255
1733 ; CHECK-NEXT: [[AND:%[0-9]+]]:_(s64) = G_AND %xhi, [[C]]
1734 ; CHECK-NEXT: [[AND1:%[0-9]+]]:_(s64) = G_AND %xlo, [[C1]]
1735 ; CHECK-NEXT: [[AND2:%[0-9]+]]:_(s64) = G_AND %yhi, [[C]]
1736 ; CHECK-NEXT: [[AND3:%[0-9]+]]:_(s64) = G_AND %ylo, [[C1]]
1737 ; CHECK-NEXT: [[C2:%[0-9]+]]:_(s64) = G_CONSTANT i64 0
1738 ; CHECK-NEXT: [[XOR:%[0-9]+]]:_(s64) = G_XOR [[AND]], [[AND2]]
1739 ; CHECK-NEXT: [[XOR1:%[0-9]+]]:_(s64) = G_XOR [[AND1]], [[AND3]]
1740 ; CHECK-NEXT: [[OR:%[0-9]+]]:_(s64) = G_OR [[XOR]], [[XOR1]]
1741 ; CHECK-NEXT: [[ICMP:%[0-9]+]]:_(s64) = G_ICMP intpred(ne), [[OR]](s64), [[C2]]
1742 ; CHECK-NEXT: $x10 = COPY [[ICMP]](s64)
1743 ; CHECK-NEXT: PseudoRET implicit $x10
1744 %xhi:_(s64) = COPY $x10
1745 %xlo:_(s64) = COPY $x11
1746 %yhi:_(s64) = COPY $x12
1747 %ylo:_(s64) = COPY $x13
1748 %x0:_(s128) = G_MERGE_VALUES %xhi(s64), %xlo(s64)
1749 %y0:_(s128) = G_MERGE_VALUES %yhi(s64), %ylo(s64)
1750 %x:_(s72) = G_TRUNC %x0(s128)
1751 %y:_(s72) = G_TRUNC %y0(s128)
1752 %z:_(s1) = G_ICMP intpred(ne), %x, %y
1753 %z0:_(s64) = G_ANYEXT %z(s1)
1754 $x10 = COPY %z0(s64)
1755 PseudoRET implicit $x10
1762 ; CHECK-LABEL: name: cmp_ne_i128
1763 ; CHECK: %xhi:_(s64) = COPY $x10
1764 ; CHECK-NEXT: %xlo:_(s64) = COPY $x11
1765 ; CHECK-NEXT: %yhi:_(s64) = COPY $x12
1766 ; CHECK-NEXT: %ylo:_(s64) = COPY $x13
1767 ; CHECK-NEXT: [[C:%[0-9]+]]:_(s64) = G_CONSTANT i64 0
1768 ; CHECK-NEXT: [[XOR:%[0-9]+]]:_(s64) = G_XOR %xhi, %yhi
1769 ; CHECK-NEXT: [[XOR1:%[0-9]+]]:_(s64) = G_XOR %xlo, %ylo
1770 ; CHECK-NEXT: [[OR:%[0-9]+]]:_(s64) = G_OR [[XOR]], [[XOR1]]
1771 ; CHECK-NEXT: [[ICMP:%[0-9]+]]:_(s64) = G_ICMP intpred(ne), [[OR]](s64), [[C]]
1772 ; CHECK-NEXT: $x10 = COPY [[ICMP]](s64)
1773 ; CHECK-NEXT: PseudoRET implicit $x10
1774 %xhi:_(s64) = COPY $x10
1775 %xlo:_(s64) = COPY $x11
1776 %yhi:_(s64) = COPY $x12
1777 %ylo:_(s64) = COPY $x13
1778 %x:_(s128) = G_MERGE_VALUES %xhi(s64), %xlo(s64)
1779 %y:_(s128) = G_MERGE_VALUES %yhi(s64), %ylo(s64)
1780 %z:_(s1) = G_ICMP intpred(ne), %x, %y
1781 %z0:_(s64) = G_ANYEXT %z(s1)
1782 $x10 = COPY %z0(s64)
1783 PseudoRET implicit $x10
1790 ; CHECK-LABEL: name: cmp_ne_ptr
1791 ; CHECK: [[COPY:%[0-9]+]]:_(p0) = COPY $x10
1792 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:_(p0) = COPY $x11
1793 ; CHECK-NEXT: [[ICMP:%[0-9]+]]:_(s64) = G_ICMP intpred(ne), [[COPY]](p0), [[COPY1]]
1794 ; CHECK-NEXT: $x10 = COPY [[ICMP]](s64)
1795 ; CHECK-NEXT: PseudoRET implicit $x10
1796 %0:_(p0) = COPY $x10
1797 %1:_(p0) = COPY $x11
1798 %2:_(s1) = G_ICMP intpred(ne), %0(p0), %1
1799 %3:_(s64) = G_ANYEXT %2(s1)
1801 PseudoRET implicit $x10