Debian Codegraph @

llvm/test/CodeGen/RISCV/GlobalISel/legalizer/legalize-icmp-rv32.mir

raw
1 # NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py
2 # RUN: llc -mtriple=riscv32 -run-pass=legalizer %s -o - \
3 # RUN: | FileCheck %s
4 ---
5 name: cmp_sgt_i7
6 body: |
7 bb.0.entry:
8 ; CHECK-LABEL: name: cmp_sgt_i7
9 ; CHECK: [[COPY:%[0-9]+]]:_(s32) = COPY $x10
10 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:_(s32) = COPY $x11
11 ; CHECK-NEXT: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 25
12 ; CHECK-NEXT: [[SHL:%[0-9]+]]:_(s32) = G_SHL [[COPY]], [[C]](s32)
13 ; CHECK-NEXT: [[ASHR:%[0-9]+]]:_(s32) = G_ASHR [[SHL]], [[C]](s32)
14 ; CHECK-NEXT: [[C1:%[0-9]+]]:_(s32) = G_CONSTANT i32 25
15 ; CHECK-NEXT: [[SHL1:%[0-9]+]]:_(s32) = G_SHL [[COPY1]], [[C1]](s32)
16 ; CHECK-NEXT: [[ASHR1:%[0-9]+]]:_(s32) = G_ASHR [[SHL1]], [[C1]](s32)
17 ; CHECK-NEXT: [[ICMP:%[0-9]+]]:_(s32) = G_ICMP intpred(sgt), [[ASHR]](s32), [[ASHR1]]
18 ; CHECK-NEXT: $x10 = COPY [[ICMP]](s32)
19 ; CHECK-NEXT: PseudoRET implicit $x10
20 %0:_(s32) = COPY $x10
21 %1:_(s32) = COPY $x11
22 %2:_(s7) = G_TRUNC %0(s32)
23 %3:_(s7) = G_TRUNC %1(s32)
24 %4:_(s1) = G_ICMP intpred(sgt), %2(s7), %3
25 %5:_(s32) = G_ANYEXT %4(s1)
26 $x10 = COPY %5(s32)
27 PseudoRET implicit $x10
28
29 ...
30 ---
31 name: cmp_sgt_i8
32 body: |
33 bb.0.entry:
34 ; CHECK-LABEL: name: cmp_sgt_i8
35 ; CHECK: [[COPY:%[0-9]+]]:_(s32) = COPY $x10
36 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:_(s32) = COPY $x11
37 ; CHECK-NEXT: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 24
38 ; CHECK-NEXT: [[SHL:%[0-9]+]]:_(s32) = G_SHL [[COPY]], [[C]](s32)
39 ; CHECK-NEXT: [[ASHR:%[0-9]+]]:_(s32) = G_ASHR [[SHL]], [[C]](s32)
40 ; CHECK-NEXT: [[C1:%[0-9]+]]:_(s32) = G_CONSTANT i32 24
41 ; CHECK-NEXT: [[SHL1:%[0-9]+]]:_(s32) = G_SHL [[COPY1]], [[C1]](s32)
42 ; CHECK-NEXT: [[ASHR1:%[0-9]+]]:_(s32) = G_ASHR [[SHL1]], [[C1]](s32)
43 ; CHECK-NEXT: [[ICMP:%[0-9]+]]:_(s32) = G_ICMP intpred(sgt), [[ASHR]](s32), [[ASHR1]]
44 ; CHECK-NEXT: $x10 = COPY [[ICMP]](s32)
45 ; CHECK-NEXT: PseudoRET implicit $x10
46 %0:_(s32) = COPY $x10
47 %1:_(s32) = COPY $x11
48 %2:_(s8) = G_TRUNC %0(s32)
49 %3:_(s8) = G_TRUNC %1(s32)
50 %4:_(s1) = G_ICMP intpred(sgt), %2(s8), %3
51 %5:_(s32) = G_ANYEXT %4(s1)
52 $x10 = COPY %5(s32)
53 PseudoRET implicit $x10
54
55 ...
56 ---
57 name: cmp_sgt_i16
58 body: |
59 bb.0.entry:
60 ; CHECK-LABEL: name: cmp_sgt_i16
61 ; CHECK: [[COPY:%[0-9]+]]:_(s32) = COPY $x10
62 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:_(s32) = COPY $x11
63 ; CHECK-NEXT: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 16
64 ; CHECK-NEXT: [[SHL:%[0-9]+]]:_(s32) = G_SHL [[COPY]], [[C]](s32)
65 ; CHECK-NEXT: [[ASHR:%[0-9]+]]:_(s32) = G_ASHR [[SHL]], [[C]](s32)
66 ; CHECK-NEXT: [[C1:%[0-9]+]]:_(s32) = G_CONSTANT i32 16
67 ; CHECK-NEXT: [[SHL1:%[0-9]+]]:_(s32) = G_SHL [[COPY1]], [[C1]](s32)
68 ; CHECK-NEXT: [[ASHR1:%[0-9]+]]:_(s32) = G_ASHR [[SHL1]], [[C1]](s32)
69 ; CHECK-NEXT: [[ICMP:%[0-9]+]]:_(s32) = G_ICMP intpred(sgt), [[ASHR]](s32), [[ASHR1]]
70 ; CHECK-NEXT: $x10 = COPY [[ICMP]](s32)
71 ; CHECK-NEXT: PseudoRET implicit $x10
72 %0:_(s32) = COPY $x10
73 %1:_(s32) = COPY $x11
74 %2:_(s16) = G_TRUNC %0(s32)
75 %3:_(s16) = G_TRUNC %1(s32)
76 %4:_(s1) = G_ICMP intpred(sgt), %2(s16), %3
77 %5:_(s32) = G_ANYEXT %4(s1)
78 $x10 = COPY %5(s32)
79 PseudoRET implicit $x10
80
81 ...
82 ---
83 name: cmp_sgt_i32
84 body: |
85 bb.0.entry:
86 ; CHECK-LABEL: name: cmp_sgt_i32
87 ; CHECK: [[COPY:%[0-9]+]]:_(s32) = COPY $x10
88 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:_(s32) = COPY $x11
89 ; CHECK-NEXT: [[ICMP:%[0-9]+]]:_(s32) = G_ICMP intpred(sgt), [[COPY]](s32), [[COPY1]]
90 ; CHECK-NEXT: $x10 = COPY [[ICMP]](s32)
91 ; CHECK-NEXT: PseudoRET implicit $x10
92 %0:_(s32) = COPY $x10
93 %1:_(s32) = COPY $x11
94 %2:_(s1) = G_ICMP intpred(sgt), %0(s32), %1
95 %3:_(s32) = G_ANYEXT %2(s1)
96 $x10 = COPY %3(s32)
97 PseudoRET implicit $x10
98
99 ...
100 ---
101 name: cmp_sgt_i48
102 body: |
103 bb.0.entry:
104 ; CHECK-LABEL: name: cmp_sgt_i48
105 ; CHECK: %xhi:_(s32) = COPY $x10
106 ; CHECK-NEXT: %xlo:_(s32) = COPY $x11
107 ; CHECK-NEXT: %yhi:_(s32) = COPY $x12
108 ; CHECK-NEXT: %ylo:_(s32) = COPY $x13
109 ; CHECK-NEXT: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 16
110 ; CHECK-NEXT: [[SHL:%[0-9]+]]:_(s32) = G_SHL %xlo, [[C]](s32)
111 ; CHECK-NEXT: [[ASHR:%[0-9]+]]:_(s32) = G_ASHR [[SHL]], [[C]](s32)
112 ; CHECK-NEXT: [[C1:%[0-9]+]]:_(s32) = G_CONSTANT i32 16
113 ; CHECK-NEXT: [[SHL1:%[0-9]+]]:_(s32) = G_SHL %ylo, [[C1]](s32)
114 ; CHECK-NEXT: [[ASHR1:%[0-9]+]]:_(s32) = G_ASHR [[SHL1]], [[C1]](s32)
115 ; CHECK-NEXT: [[ICMP:%[0-9]+]]:_(s32) = G_ICMP intpred(sgt), [[ASHR]](s32), [[ASHR1]]
116 ; CHECK-NEXT: [[ICMP1:%[0-9]+]]:_(s32) = G_ICMP intpred(eq), [[ASHR]](s32), [[ASHR1]]
117 ; CHECK-NEXT: [[ICMP2:%[0-9]+]]:_(s32) = G_ICMP intpred(ugt), %xhi(s32), %yhi
118 ; CHECK-NEXT: [[SELECT:%[0-9]+]]:_(s32) = G_SELECT [[ICMP1]](s32), [[ICMP2]], [[ICMP]]
119 ; CHECK-NEXT: $x10 = COPY [[SELECT]](s32)
120 ; CHECK-NEXT: PseudoRET implicit $x10
121 %xhi:_(s32) = COPY $x10
122 %xlo:_(s32) = COPY $x11
123 %yhi:_(s32) = COPY $x12
124 %ylo:_(s32) = COPY $x13
125 %x0:_(s64) = G_MERGE_VALUES %xhi(s32), %xlo(s32)
126 %y0:_(s64) = G_MERGE_VALUES %yhi(s32), %ylo(s32)
127 %x:_(s48) = G_TRUNC %x0(s64)
128 %y:_(s48) = G_TRUNC %y0(s64)
129 %z:_(s1) = G_ICMP intpred(sgt), %x(s48), %y
130 %z0:_(s32) = G_ANYEXT %z(s1)
131 $x10 = COPY %z0(s32)
132 PseudoRET implicit $x10
133
134 ...
135 ---
136 name: cmp_sgt_i64
137 body: |
138 bb.0.entry:
139 ; CHECK-LABEL: name: cmp_sgt_i64
140 ; CHECK: %xhi:_(s32) = COPY $x10
141 ; CHECK-NEXT: %xlo:_(s32) = COPY $x11
142 ; CHECK-NEXT: %yhi:_(s32) = COPY $x12
143 ; CHECK-NEXT: %ylo:_(s32) = COPY $x13
144 ; CHECK-NEXT: [[ICMP:%[0-9]+]]:_(s32) = G_ICMP intpred(sgt), %xlo(s32), %ylo
145 ; CHECK-NEXT: [[ICMP1:%[0-9]+]]:_(s32) = G_ICMP intpred(eq), %xlo(s32), %ylo
146 ; CHECK-NEXT: [[ICMP2:%[0-9]+]]:_(s32) = G_ICMP intpred(ugt), %xhi(s32), %yhi
147 ; CHECK-NEXT: [[SELECT:%[0-9]+]]:_(s32) = G_SELECT [[ICMP1]](s32), [[ICMP2]], [[ICMP]]
148 ; CHECK-NEXT: $x10 = COPY [[SELECT]](s32)
149 ; CHECK-NEXT: PseudoRET implicit $x10
150 %xhi:_(s32) = COPY $x10
151 %xlo:_(s32) = COPY $x11
152 %yhi:_(s32) = COPY $x12
153 %ylo:_(s32) = COPY $x13
154 %x:_(s64) = G_MERGE_VALUES %xhi(s32), %xlo(s32)
155 %y:_(s64) = G_MERGE_VALUES %yhi(s32), %ylo(s32)
156 %z:_(s1) = G_ICMP intpred(sgt), %x, %y
157 %z0:_(s32) = G_ANYEXT %z(s1)
158 $x10 = COPY %z0(s32)
159 PseudoRET implicit $x10
160
161 ...
162 ---
163 name: cmp_slt_i7
164 body: |
165 bb.0.entry:
166 ; CHECK-LABEL: name: cmp_slt_i7
167 ; CHECK: [[COPY:%[0-9]+]]:_(s32) = COPY $x10
168 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:_(s32) = COPY $x11
169 ; CHECK-NEXT: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 25
170 ; CHECK-NEXT: [[SHL:%[0-9]+]]:_(s32) = G_SHL [[COPY]], [[C]](s32)
171 ; CHECK-NEXT: [[ASHR:%[0-9]+]]:_(s32) = G_ASHR [[SHL]], [[C]](s32)
172 ; CHECK-NEXT: [[C1:%[0-9]+]]:_(s32) = G_CONSTANT i32 25
173 ; CHECK-NEXT: [[SHL1:%[0-9]+]]:_(s32) = G_SHL [[COPY1]], [[C1]](s32)
174 ; CHECK-NEXT: [[ASHR1:%[0-9]+]]:_(s32) = G_ASHR [[SHL1]], [[C1]](s32)
175 ; CHECK-NEXT: [[ICMP:%[0-9]+]]:_(s32) = G_ICMP intpred(slt), [[ASHR]](s32), [[ASHR1]]
176 ; CHECK-NEXT: $x10 = COPY [[ICMP]](s32)
177 ; CHECK-NEXT: PseudoRET implicit $x10
178 %0:_(s32) = COPY $x10
179 %1:_(s32) = COPY $x11
180 %2:_(s7) = G_TRUNC %0(s32)
181 %3:_(s7) = G_TRUNC %1(s32)
182 %4:_(s1) = G_ICMP intpred(slt), %2(s7), %3
183 %5:_(s32) = G_ANYEXT %4(s1)
184 $x10 = COPY %5(s32)
185 PseudoRET implicit $x10
186
187 ...
188 ---
189 name: cmp_slt_i8
190 body: |
191 bb.0.entry:
192 ; CHECK-LABEL: name: cmp_slt_i8
193 ; CHECK: [[COPY:%[0-9]+]]:_(s32) = COPY $x10
194 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:_(s32) = COPY $x11
195 ; CHECK-NEXT: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 24
196 ; CHECK-NEXT: [[SHL:%[0-9]+]]:_(s32) = G_SHL [[COPY]], [[C]](s32)
197 ; CHECK-NEXT: [[ASHR:%[0-9]+]]:_(s32) = G_ASHR [[SHL]], [[C]](s32)
198 ; CHECK-NEXT: [[C1:%[0-9]+]]:_(s32) = G_CONSTANT i32 24
199 ; CHECK-NEXT: [[SHL1:%[0-9]+]]:_(s32) = G_SHL [[COPY1]], [[C1]](s32)
200 ; CHECK-NEXT: [[ASHR1:%[0-9]+]]:_(s32) = G_ASHR [[SHL1]], [[C1]](s32)
201 ; CHECK-NEXT: [[ICMP:%[0-9]+]]:_(s32) = G_ICMP intpred(slt), [[ASHR]](s32), [[ASHR1]]
202 ; CHECK-NEXT: $x10 = COPY [[ICMP]](s32)
203 ; CHECK-NEXT: PseudoRET implicit $x10
204 %0:_(s32) = COPY $x10
205 %1:_(s32) = COPY $x11
206 %2:_(s8) = G_TRUNC %0(s32)
207 %3:_(s8) = G_TRUNC %1(s32)
208 %4:_(s1) = G_ICMP intpred(slt), %2(s8), %3
209 %5:_(s32) = G_ANYEXT %4(s1)
210 $x10 = COPY %5(s32)
211 PseudoRET implicit $x10
212
213 ...
214 ---
215 name: cmp_slt_i16
216 body: |
217 bb.0.entry:
218 ; CHECK-LABEL: name: cmp_slt_i16
219 ; CHECK: [[COPY:%[0-9]+]]:_(s32) = COPY $x10
220 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:_(s32) = COPY $x11
221 ; CHECK-NEXT: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 16
222 ; CHECK-NEXT: [[SHL:%[0-9]+]]:_(s32) = G_SHL [[COPY]], [[C]](s32)
223 ; CHECK-NEXT: [[ASHR:%[0-9]+]]:_(s32) = G_ASHR [[SHL]], [[C]](s32)
224 ; CHECK-NEXT: [[C1:%[0-9]+]]:_(s32) = G_CONSTANT i32 16
225 ; CHECK-NEXT: [[SHL1:%[0-9]+]]:_(s32) = G_SHL [[COPY1]], [[C1]](s32)
226 ; CHECK-NEXT: [[ASHR1:%[0-9]+]]:_(s32) = G_ASHR [[SHL1]], [[C1]](s32)
227 ; CHECK-NEXT: [[ICMP:%[0-9]+]]:_(s32) = G_ICMP intpred(slt), [[ASHR]](s32), [[ASHR1]]
228 ; CHECK-NEXT: $x10 = COPY [[ICMP]](s32)
229 ; CHECK-NEXT: PseudoRET implicit $x10
230 %0:_(s32) = COPY $x10
231 %1:_(s32) = COPY $x11
232 %2:_(s16) = G_TRUNC %0(s32)
233 %3:_(s16) = G_TRUNC %1(s32)
234 %4:_(s1) = G_ICMP intpred(slt), %2(s16), %3
235 %5:_(s32) = G_ANYEXT %4(s1)
236 $x10 = COPY %5(s32)
237 PseudoRET implicit $x10
238
239 ...
240 ---
241 name: cmp_slt_i32
242 body: |
243 bb.0.entry:
244 ; CHECK-LABEL: name: cmp_slt_i32
245 ; CHECK: [[COPY:%[0-9]+]]:_(s32) = COPY $x10
246 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:_(s32) = COPY $x11
247 ; CHECK-NEXT: [[ICMP:%[0-9]+]]:_(s32) = G_ICMP intpred(slt), [[COPY]](s32), [[COPY1]]
248 ; CHECK-NEXT: $x10 = COPY [[ICMP]](s32)
249 ; CHECK-NEXT: PseudoRET implicit $x10
250 %0:_(s32) = COPY $x10
251 %1:_(s32) = COPY $x11
252 %2:_(s1) = G_ICMP intpred(slt), %0(s32), %1
253 %3:_(s32) = G_ANYEXT %2(s1)
254 $x10 = COPY %3(s32)
255 PseudoRET implicit $x10
256
257 ...
258 ---
259 name: cmp_slt_i48
260 body: |
261 bb.0.entry:
262 ; CHECK-LABEL: name: cmp_slt_i48
263 ; CHECK: %xhi:_(s32) = COPY $x10
264 ; CHECK-NEXT: %xlo:_(s32) = COPY $x11
265 ; CHECK-NEXT: %yhi:_(s32) = COPY $x12
266 ; CHECK-NEXT: %ylo:_(s32) = COPY $x13
267 ; CHECK-NEXT: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 16
268 ; CHECK-NEXT: [[SHL:%[0-9]+]]:_(s32) = G_SHL %xlo, [[C]](s32)
269 ; CHECK-NEXT: [[ASHR:%[0-9]+]]:_(s32) = G_ASHR [[SHL]], [[C]](s32)
270 ; CHECK-NEXT: [[C1:%[0-9]+]]:_(s32) = G_CONSTANT i32 16
271 ; CHECK-NEXT: [[SHL1:%[0-9]+]]:_(s32) = G_SHL %ylo, [[C1]](s32)
272 ; CHECK-NEXT: [[ASHR1:%[0-9]+]]:_(s32) = G_ASHR [[SHL1]], [[C1]](s32)
273 ; CHECK-NEXT: [[ICMP:%[0-9]+]]:_(s32) = G_ICMP intpred(slt), [[ASHR]](s32), [[ASHR1]]
274 ; CHECK-NEXT: [[ICMP1:%[0-9]+]]:_(s32) = G_ICMP intpred(eq), [[ASHR]](s32), [[ASHR1]]
275 ; CHECK-NEXT: [[ICMP2:%[0-9]+]]:_(s32) = G_ICMP intpred(ult), %xhi(s32), %yhi
276 ; CHECK-NEXT: [[SELECT:%[0-9]+]]:_(s32) = G_SELECT [[ICMP1]](s32), [[ICMP2]], [[ICMP]]
277 ; CHECK-NEXT: $x10 = COPY [[SELECT]](s32)
278 ; CHECK-NEXT: PseudoRET implicit $x10
279 %xhi:_(s32) = COPY $x10
280 %xlo:_(s32) = COPY $x11
281 %yhi:_(s32) = COPY $x12
282 %ylo:_(s32) = COPY $x13
283 %x0:_(s64) = G_MERGE_VALUES %xhi(s32), %xlo(s32)
284 %y0:_(s64) = G_MERGE_VALUES %yhi(s32), %ylo(s32)
285 %x:_(s48) = G_TRUNC %x0(s64)
286 %y:_(s48) = G_TRUNC %y0(s64)
287 %z:_(s1) = G_ICMP intpred(slt), %x(s48), %y
288 %z0:_(s32) = G_ANYEXT %z(s1)
289 $x10 = COPY %z0(s32)
290 PseudoRET implicit $x10
291
292 ...
293 ---
294 name: cmp_slt_i64
295 body: |
296 bb.0.entry:
297 ; CHECK-LABEL: name: cmp_slt_i64
298 ; CHECK: %xhi:_(s32) = COPY $x10
299 ; CHECK-NEXT: %xlo:_(s32) = COPY $x11
300 ; CHECK-NEXT: %yhi:_(s32) = COPY $x12
301 ; CHECK-NEXT: %ylo:_(s32) = COPY $x13
302 ; CHECK-NEXT: [[ICMP:%[0-9]+]]:_(s32) = G_ICMP intpred(slt), %xlo(s32), %ylo
303 ; CHECK-NEXT: [[ICMP1:%[0-9]+]]:_(s32) = G_ICMP intpred(eq), %xlo(s32), %ylo
304 ; CHECK-NEXT: [[ICMP2:%[0-9]+]]:_(s32) = G_ICMP intpred(ult), %xhi(s32), %yhi
305 ; CHECK-NEXT: [[SELECT:%[0-9]+]]:_(s32) = G_SELECT [[ICMP1]](s32), [[ICMP2]], [[ICMP]]
306 ; CHECK-NEXT: $x10 = COPY [[SELECT]](s32)
307 ; CHECK-NEXT: PseudoRET implicit $x10
308 %xhi:_(s32) = COPY $x10
309 %xlo:_(s32) = COPY $x11
310 %yhi:_(s32) = COPY $x12
311 %ylo:_(s32) = COPY $x13
312 %x:_(s64) = G_MERGE_VALUES %xhi(s32), %xlo(s32)
313 %y:_(s64) = G_MERGE_VALUES %yhi(s32), %ylo(s32)
314 %z:_(s1) = G_ICMP intpred(slt), %x, %y
315 %z0:_(s32) = G_ANYEXT %z(s1)
316 $x10 = COPY %z0(s32)
317 PseudoRET implicit $x10
318
319 ...
320 ---
321 name: cmp_sge_i7
322 body: |
323 bb.0.entry:
324 ; CHECK-LABEL: name: cmp_sge_i7
325 ; CHECK: [[COPY:%[0-9]+]]:_(s32) = COPY $x10
326 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:_(s32) = COPY $x11
327 ; CHECK-NEXT: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 25
328 ; CHECK-NEXT: [[SHL:%[0-9]+]]:_(s32) = G_SHL [[COPY]], [[C]](s32)
329 ; CHECK-NEXT: [[ASHR:%[0-9]+]]:_(s32) = G_ASHR [[SHL]], [[C]](s32)
330 ; CHECK-NEXT: [[C1:%[0-9]+]]:_(s32) = G_CONSTANT i32 25
331 ; CHECK-NEXT: [[SHL1:%[0-9]+]]:_(s32) = G_SHL [[COPY1]], [[C1]](s32)
332 ; CHECK-NEXT: [[ASHR1:%[0-9]+]]:_(s32) = G_ASHR [[SHL1]], [[C1]](s32)
333 ; CHECK-NEXT: [[ICMP:%[0-9]+]]:_(s32) = G_ICMP intpred(sge), [[ASHR]](s32), [[ASHR1]]
334 ; CHECK-NEXT: $x10 = COPY [[ICMP]](s32)
335 ; CHECK-NEXT: PseudoRET implicit $x10
336 %0:_(s32) = COPY $x10
337 %1:_(s32) = COPY $x11
338 %2:_(s7) = G_TRUNC %0(s32)
339 %3:_(s7) = G_TRUNC %1(s32)
340 %4:_(s1) = G_ICMP intpred(sge), %2(s7), %3
341 %5:_(s32) = G_ANYEXT %4(s1)
342 $x10 = COPY %5(s32)
343 PseudoRET implicit $x10
344
345 ...
346 ---
347 name: cmp_sge_i8
348 body: |
349 bb.0.entry:
350 ; CHECK-LABEL: name: cmp_sge_i8
351 ; CHECK: [[COPY:%[0-9]+]]:_(s32) = COPY $x10
352 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:_(s32) = COPY $x11
353 ; CHECK-NEXT: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 24
354 ; CHECK-NEXT: [[SHL:%[0-9]+]]:_(s32) = G_SHL [[COPY]], [[C]](s32)
355 ; CHECK-NEXT: [[ASHR:%[0-9]+]]:_(s32) = G_ASHR [[SHL]], [[C]](s32)
356 ; CHECK-NEXT: [[C1:%[0-9]+]]:_(s32) = G_CONSTANT i32 24
357 ; CHECK-NEXT: [[SHL1:%[0-9]+]]:_(s32) = G_SHL [[COPY1]], [[C1]](s32)
358 ; CHECK-NEXT: [[ASHR1:%[0-9]+]]:_(s32) = G_ASHR [[SHL1]], [[C1]](s32)
359 ; CHECK-NEXT: [[ICMP:%[0-9]+]]:_(s32) = G_ICMP intpred(sge), [[ASHR]](s32), [[ASHR1]]
360 ; CHECK-NEXT: $x10 = COPY [[ICMP]](s32)
361 ; CHECK-NEXT: PseudoRET implicit $x10
362 %0:_(s32) = COPY $x10
363 %1:_(s32) = COPY $x11
364 %2:_(s8) = G_TRUNC %0(s32)
365 %3:_(s8) = G_TRUNC %1(s32)
366 %4:_(s1) = G_ICMP intpred(sge), %2(s8), %3
367 %5:_(s32) = G_ANYEXT %4(s1)
368 $x10 = COPY %5(s32)
369 PseudoRET implicit $x10
370
371 ...
372 ---
373 name: cmp_sge_i16
374 body: |
375 bb.0.entry:
376 ; CHECK-LABEL: name: cmp_sge_i16
377 ; CHECK: [[COPY:%[0-9]+]]:_(s32) = COPY $x10
378 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:_(s32) = COPY $x11
379 ; CHECK-NEXT: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 16
380 ; CHECK-NEXT: [[SHL:%[0-9]+]]:_(s32) = G_SHL [[COPY]], [[C]](s32)
381 ; CHECK-NEXT: [[ASHR:%[0-9]+]]:_(s32) = G_ASHR [[SHL]], [[C]](s32)
382 ; CHECK-NEXT: [[C1:%[0-9]+]]:_(s32) = G_CONSTANT i32 16
383 ; CHECK-NEXT: [[SHL1:%[0-9]+]]:_(s32) = G_SHL [[COPY1]], [[C1]](s32)
384 ; CHECK-NEXT: [[ASHR1:%[0-9]+]]:_(s32) = G_ASHR [[SHL1]], [[C1]](s32)
385 ; CHECK-NEXT: [[ICMP:%[0-9]+]]:_(s32) = G_ICMP intpred(sge), [[ASHR]](s32), [[ASHR1]]
386 ; CHECK-NEXT: $x10 = COPY [[ICMP]](s32)
387 ; CHECK-NEXT: PseudoRET implicit $x10
388 %0:_(s32) = COPY $x10
389 %1:_(s32) = COPY $x11
390 %2:_(s16) = G_TRUNC %0(s32)
391 %3:_(s16) = G_TRUNC %1(s32)
392 %4:_(s1) = G_ICMP intpred(sge), %2(s16), %3
393 %5:_(s32) = G_ANYEXT %4(s1)
394 $x10 = COPY %5(s32)
395 PseudoRET implicit $x10
396
397 ...
398 ---
399 name: cmp_sge_i32
400 body: |
401 bb.0.entry:
402 ; CHECK-LABEL: name: cmp_sge_i32
403 ; CHECK: [[COPY:%[0-9]+]]:_(s32) = COPY $x10
404 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:_(s32) = COPY $x11
405 ; CHECK-NEXT: [[ICMP:%[0-9]+]]:_(s32) = G_ICMP intpred(sge), [[COPY]](s32), [[COPY1]]
406 ; CHECK-NEXT: $x10 = COPY [[ICMP]](s32)
407 ; CHECK-NEXT: PseudoRET implicit $x10
408 %0:_(s32) = COPY $x10
409 %1:_(s32) = COPY $x11
410 %2:_(s1) = G_ICMP intpred(sge), %0(s32), %1
411 %3:_(s32) = G_ANYEXT %2(s1)
412 $x10 = COPY %3(s32)
413 PseudoRET implicit $x10
414
415 ...
416 ---
417 name: cmp_sge_i48
418 body: |
419 bb.0.entry:
420 ; CHECK-LABEL: name: cmp_sge_i48
421 ; CHECK: %xhi:_(s32) = COPY $x10
422 ; CHECK-NEXT: %xlo:_(s32) = COPY $x11
423 ; CHECK-NEXT: %yhi:_(s32) = COPY $x12
424 ; CHECK-NEXT: %ylo:_(s32) = COPY $x13
425 ; CHECK-NEXT: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 16
426 ; CHECK-NEXT: [[SHL:%[0-9]+]]:_(s32) = G_SHL %xlo, [[C]](s32)
427 ; CHECK-NEXT: [[ASHR:%[0-9]+]]:_(s32) = G_ASHR [[SHL]], [[C]](s32)
428 ; CHECK-NEXT: [[C1:%[0-9]+]]:_(s32) = G_CONSTANT i32 16
429 ; CHECK-NEXT: [[SHL1:%[0-9]+]]:_(s32) = G_SHL %ylo, [[C1]](s32)
430 ; CHECK-NEXT: [[ASHR1:%[0-9]+]]:_(s32) = G_ASHR [[SHL1]], [[C1]](s32)
431 ; CHECK-NEXT: [[ICMP:%[0-9]+]]:_(s32) = G_ICMP intpred(sge), [[ASHR]](s32), [[ASHR1]]
432 ; CHECK-NEXT: [[ICMP1:%[0-9]+]]:_(s32) = G_ICMP intpred(eq), [[ASHR]](s32), [[ASHR1]]
433 ; CHECK-NEXT: [[ICMP2:%[0-9]+]]:_(s32) = G_ICMP intpred(uge), %xhi(s32), %yhi
434 ; CHECK-NEXT: [[SELECT:%[0-9]+]]:_(s32) = G_SELECT [[ICMP1]](s32), [[ICMP2]], [[ICMP]]
435 ; CHECK-NEXT: $x10 = COPY [[SELECT]](s32)
436 ; CHECK-NEXT: PseudoRET implicit $x10
437 %xhi:_(s32) = COPY $x10
438 %xlo:_(s32) = COPY $x11
439 %yhi:_(s32) = COPY $x12
440 %ylo:_(s32) = COPY $x13
441 %x0:_(s64) = G_MERGE_VALUES %xhi(s32), %xlo(s32)
442 %y0:_(s64) = G_MERGE_VALUES %yhi(s32), %ylo(s32)
443 %x:_(s48) = G_TRUNC %x0(s64)
444 %y:_(s48) = G_TRUNC %y0(s64)
445 %z:_(s1) = G_ICMP intpred(sge), %x(s48), %y
446 %z0:_(s32) = G_ANYEXT %z(s1)
447 $x10 = COPY %z0(s32)
448 PseudoRET implicit $x10
449
450 ...
451 ---
452 name: cmp_sge_i64
453 body: |
454 bb.0.entry:
455 ; CHECK-LABEL: name: cmp_sge_i64
456 ; CHECK: %xhi:_(s32) = COPY $x10
457 ; CHECK-NEXT: %xlo:_(s32) = COPY $x11
458 ; CHECK-NEXT: %yhi:_(s32) = COPY $x12
459 ; CHECK-NEXT: %ylo:_(s32) = COPY $x13
460 ; CHECK-NEXT: [[ICMP:%[0-9]+]]:_(s32) = G_ICMP intpred(sge), %xlo(s32), %ylo
461 ; CHECK-NEXT: [[ICMP1:%[0-9]+]]:_(s32) = G_ICMP intpred(eq), %xlo(s32), %ylo
462 ; CHECK-NEXT: [[ICMP2:%[0-9]+]]:_(s32) = G_ICMP intpred(uge), %xhi(s32), %yhi
463 ; CHECK-NEXT: [[SELECT:%[0-9]+]]:_(s32) = G_SELECT [[ICMP1]](s32), [[ICMP2]], [[ICMP]]
464 ; CHECK-NEXT: $x10 = COPY [[SELECT]](s32)
465 ; CHECK-NEXT: PseudoRET implicit $x10
466 %xhi:_(s32) = COPY $x10
467 %xlo:_(s32) = COPY $x11
468 %yhi:_(s32) = COPY $x12
469 %ylo:_(s32) = COPY $x13
470 %x:_(s64) = G_MERGE_VALUES %xhi(s32), %xlo(s32)
471 %y:_(s64) = G_MERGE_VALUES %yhi(s32), %ylo(s32)
472 %z:_(s1) = G_ICMP intpred(sge), %x, %y
473 %z0:_(s32) = G_ANYEXT %z(s1)
474 $x10 = COPY %z0(s32)
475 PseudoRET implicit $x10
476
477 ...
478 ---
479 name: cmp_sle_i7
480 body: |
481 bb.0.entry:
482 ; CHECK-LABEL: name: cmp_sle_i7
483 ; CHECK: [[COPY:%[0-9]+]]:_(s32) = COPY $x10
484 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:_(s32) = COPY $x11
485 ; CHECK-NEXT: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 25
486 ; CHECK-NEXT: [[SHL:%[0-9]+]]:_(s32) = G_SHL [[COPY]], [[C]](s32)
487 ; CHECK-NEXT: [[ASHR:%[0-9]+]]:_(s32) = G_ASHR [[SHL]], [[C]](s32)
488 ; CHECK-NEXT: [[C1:%[0-9]+]]:_(s32) = G_CONSTANT i32 25
489 ; CHECK-NEXT: [[SHL1:%[0-9]+]]:_(s32) = G_SHL [[COPY1]], [[C1]](s32)
490 ; CHECK-NEXT: [[ASHR1:%[0-9]+]]:_(s32) = G_ASHR [[SHL1]], [[C1]](s32)
491 ; CHECK-NEXT: [[ICMP:%[0-9]+]]:_(s32) = G_ICMP intpred(sle), [[ASHR]](s32), [[ASHR1]]
492 ; CHECK-NEXT: $x10 = COPY [[ICMP]](s32)
493 ; CHECK-NEXT: PseudoRET implicit $x10
494 %0:_(s32) = COPY $x10
495 %1:_(s32) = COPY $x11
496 %2:_(s7) = G_TRUNC %0(s32)
497 %3:_(s7) = G_TRUNC %1(s32)
498 %4:_(s1) = G_ICMP intpred(sle), %2(s7), %3
499 %5:_(s32) = G_ANYEXT %4(s1)
500 $x10 = COPY %5(s32)
501 PseudoRET implicit $x10
502
503 ...
504 ---
505 name: cmp_sle_i8
506 body: |
507 bb.0.entry:
508 ; CHECK-LABEL: name: cmp_sle_i8
509 ; CHECK: [[COPY:%[0-9]+]]:_(s32) = COPY $x10
510 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:_(s32) = COPY $x11
511 ; CHECK-NEXT: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 24
512 ; CHECK-NEXT: [[SHL:%[0-9]+]]:_(s32) = G_SHL [[COPY]], [[C]](s32)
513 ; CHECK-NEXT: [[ASHR:%[0-9]+]]:_(s32) = G_ASHR [[SHL]], [[C]](s32)
514 ; CHECK-NEXT: [[C1:%[0-9]+]]:_(s32) = G_CONSTANT i32 24
515 ; CHECK-NEXT: [[SHL1:%[0-9]+]]:_(s32) = G_SHL [[COPY1]], [[C1]](s32)
516 ; CHECK-NEXT: [[ASHR1:%[0-9]+]]:_(s32) = G_ASHR [[SHL1]], [[C1]](s32)
517 ; CHECK-NEXT: [[ICMP:%[0-9]+]]:_(s32) = G_ICMP intpred(sle), [[ASHR]](s32), [[ASHR1]]
518 ; CHECK-NEXT: $x10 = COPY [[ICMP]](s32)
519 ; CHECK-NEXT: PseudoRET implicit $x10
520 %0:_(s32) = COPY $x10
521 %1:_(s32) = COPY $x11
522 %2:_(s8) = G_TRUNC %0(s32)
523 %3:_(s8) = G_TRUNC %1(s32)
524 %4:_(s1) = G_ICMP intpred(sle), %2(s8), %3
525 %5:_(s32) = G_ANYEXT %4(s1)
526 $x10 = COPY %5(s32)
527 PseudoRET implicit $x10
528
529 ...
530 ---
531 name: cmp_sle_i16
532 body: |
533 bb.0.entry:
534 ; CHECK-LABEL: name: cmp_sle_i16
535 ; CHECK: [[COPY:%[0-9]+]]:_(s32) = COPY $x10
536 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:_(s32) = COPY $x11
537 ; CHECK-NEXT: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 16
538 ; CHECK-NEXT: [[SHL:%[0-9]+]]:_(s32) = G_SHL [[COPY]], [[C]](s32)
539 ; CHECK-NEXT: [[ASHR:%[0-9]+]]:_(s32) = G_ASHR [[SHL]], [[C]](s32)
540 ; CHECK-NEXT: [[C1:%[0-9]+]]:_(s32) = G_CONSTANT i32 16
541 ; CHECK-NEXT: [[SHL1:%[0-9]+]]:_(s32) = G_SHL [[COPY1]], [[C1]](s32)
542 ; CHECK-NEXT: [[ASHR1:%[0-9]+]]:_(s32) = G_ASHR [[SHL1]], [[C1]](s32)
543 ; CHECK-NEXT: [[ICMP:%[0-9]+]]:_(s32) = G_ICMP intpred(sle), [[ASHR]](s32), [[ASHR1]]
544 ; CHECK-NEXT: $x10 = COPY [[ICMP]](s32)
545 ; CHECK-NEXT: PseudoRET implicit $x10
546 %0:_(s32) = COPY $x10
547 %1:_(s32) = COPY $x11
548 %2:_(s16) = G_TRUNC %0(s32)
549 %3:_(s16) = G_TRUNC %1(s32)
550 %4:_(s1) = G_ICMP intpred(sle), %2(s16), %3
551 %5:_(s32) = G_ANYEXT %4(s1)
552 $x10 = COPY %5(s32)
553 PseudoRET implicit $x10
554
555 ...
556 ---
557 name: cmp_sle_i32
558 body: |
559 bb.0.entry:
560 ; CHECK-LABEL: name: cmp_sle_i32
561 ; CHECK: [[COPY:%[0-9]+]]:_(s32) = COPY $x10
562 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:_(s32) = COPY $x11
563 ; CHECK-NEXT: [[ICMP:%[0-9]+]]:_(s32) = G_ICMP intpred(sle), [[COPY]](s32), [[COPY1]]
564 ; CHECK-NEXT: $x10 = COPY [[ICMP]](s32)
565 ; CHECK-NEXT: PseudoRET implicit $x10
566 %0:_(s32) = COPY $x10
567 %1:_(s32) = COPY $x11
568 %2:_(s1) = G_ICMP intpred(sle), %0(s32), %1
569 %3:_(s32) = G_ANYEXT %2(s1)
570 $x10 = COPY %3(s32)
571 PseudoRET implicit $x10
572
573 ...
574 ---
575 name: cmp_sle_i48
576 body: |
577 bb.0.entry:
578 ; CHECK-LABEL: name: cmp_sle_i48
579 ; CHECK: %xhi:_(s32) = COPY $x10
580 ; CHECK-NEXT: %xlo:_(s32) = COPY $x11
581 ; CHECK-NEXT: %yhi:_(s32) = COPY $x12
582 ; CHECK-NEXT: %ylo:_(s32) = COPY $x13
583 ; CHECK-NEXT: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 16
584 ; CHECK-NEXT: [[SHL:%[0-9]+]]:_(s32) = G_SHL %xlo, [[C]](s32)
585 ; CHECK-NEXT: [[ASHR:%[0-9]+]]:_(s32) = G_ASHR [[SHL]], [[C]](s32)
586 ; CHECK-NEXT: [[C1:%[0-9]+]]:_(s32) = G_CONSTANT i32 16
587 ; CHECK-NEXT: [[SHL1:%[0-9]+]]:_(s32) = G_SHL %ylo, [[C1]](s32)
588 ; CHECK-NEXT: [[ASHR1:%[0-9]+]]:_(s32) = G_ASHR [[SHL1]], [[C1]](s32)
589 ; CHECK-NEXT: [[ICMP:%[0-9]+]]:_(s32) = G_ICMP intpred(sle), [[ASHR]](s32), [[ASHR1]]
590 ; CHECK-NEXT: [[ICMP1:%[0-9]+]]:_(s32) = G_ICMP intpred(eq), [[ASHR]](s32), [[ASHR1]]
591 ; CHECK-NEXT: [[ICMP2:%[0-9]+]]:_(s32) = G_ICMP intpred(ule), %xhi(s32), %yhi
592 ; CHECK-NEXT: [[SELECT:%[0-9]+]]:_(s32) = G_SELECT [[ICMP1]](s32), [[ICMP2]], [[ICMP]]
593 ; CHECK-NEXT: $x10 = COPY [[SELECT]](s32)
594 ; CHECK-NEXT: PseudoRET implicit $x10
595 %xhi:_(s32) = COPY $x10
596 %xlo:_(s32) = COPY $x11
597 %yhi:_(s32) = COPY $x12
598 %ylo:_(s32) = COPY $x13
599 %x0:_(s64) = G_MERGE_VALUES %xhi(s32), %xlo(s32)
600 %y0:_(s64) = G_MERGE_VALUES %yhi(s32), %ylo(s32)
601 %x:_(s48) = G_TRUNC %x0(s64)
602 %y:_(s48) = G_TRUNC %y0(s64)
603 %z:_(s1) = G_ICMP intpred(sle), %x(s48), %y
604 %z0:_(s32) = G_ANYEXT %z(s1)
605 $x10 = COPY %z0(s32)
606 PseudoRET implicit $x10
607
608 ...
609 ---
610 name: cmp_sle_i64
611 body: |
612 bb.0.entry:
613 ; CHECK-LABEL: name: cmp_sle_i64
614 ; CHECK: %xhi:_(s32) = COPY $x10
615 ; CHECK-NEXT: %xlo:_(s32) = COPY $x11
616 ; CHECK-NEXT: %yhi:_(s32) = COPY $x12
617 ; CHECK-NEXT: %ylo:_(s32) = COPY $x13
618 ; CHECK-NEXT: [[ICMP:%[0-9]+]]:_(s32) = G_ICMP intpred(sle), %xlo(s32), %ylo
619 ; CHECK-NEXT: [[ICMP1:%[0-9]+]]:_(s32) = G_ICMP intpred(eq), %xlo(s32), %ylo
620 ; CHECK-NEXT: [[ICMP2:%[0-9]+]]:_(s32) = G_ICMP intpred(ule), %xhi(s32), %yhi
621 ; CHECK-NEXT: [[SELECT:%[0-9]+]]:_(s32) = G_SELECT [[ICMP1]](s32), [[ICMP2]], [[ICMP]]
622 ; CHECK-NEXT: $x10 = COPY [[SELECT]](s32)
623 ; CHECK-NEXT: PseudoRET implicit $x10
624 %xhi:_(s32) = COPY $x10
625 %xlo:_(s32) = COPY $x11
626 %yhi:_(s32) = COPY $x12
627 %ylo:_(s32) = COPY $x13
628 %x:_(s64) = G_MERGE_VALUES %xhi(s32), %xlo(s32)
629 %y:_(s64) = G_MERGE_VALUES %yhi(s32), %ylo(s32)
630 %z:_(s1) = G_ICMP intpred(sle), %x, %y
631 %z0:_(s32) = G_ANYEXT %z(s1)
632 $x10 = COPY %z0(s32)
633 PseudoRET implicit $x10
634
635 ...
636 ---
637 name: cmp_ugt_i7
638 body: |
639 bb.0.entry:
640 ; CHECK-LABEL: name: cmp_ugt_i7
641 ; CHECK: [[COPY:%[0-9]+]]:_(s32) = COPY $x10
642 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:_(s32) = COPY $x11
643 ; CHECK-NEXT: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 127
644 ; CHECK-NEXT: [[AND:%[0-9]+]]:_(s32) = G_AND [[COPY]], [[C]]
645 ; CHECK-NEXT: [[C1:%[0-9]+]]:_(s32) = G_CONSTANT i32 127
646 ; CHECK-NEXT: [[AND1:%[0-9]+]]:_(s32) = G_AND [[COPY1]], [[C1]]
647 ; CHECK-NEXT: [[ICMP:%[0-9]+]]:_(s32) = G_ICMP intpred(ugt), [[AND]](s32), [[AND1]]
648 ; CHECK-NEXT: $x10 = COPY [[ICMP]](s32)
649 ; CHECK-NEXT: PseudoRET implicit $x10
650 %0:_(s32) = COPY $x10
651 %1:_(s32) = COPY $x11
652 %2:_(s7) = G_TRUNC %0(s32)
653 %3:_(s7) = G_TRUNC %1(s32)
654 %4:_(s1) = G_ICMP intpred(ugt), %2(s7), %3
655 %5:_(s32) = G_ANYEXT %4(s1)
656 $x10 = COPY %5(s32)
657 PseudoRET implicit $x10
658
659 ...
660 ---
661 name: cmp_ugt_i8
662 body: |
663 bb.0.entry:
664 ; CHECK-LABEL: name: cmp_ugt_i8
665 ; CHECK: [[COPY:%[0-9]+]]:_(s32) = COPY $x10
666 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:_(s32) = COPY $x11
667 ; CHECK-NEXT: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 255
668 ; CHECK-NEXT: [[AND:%[0-9]+]]:_(s32) = G_AND [[COPY]], [[C]]
669 ; CHECK-NEXT: [[C1:%[0-9]+]]:_(s32) = G_CONSTANT i32 255
670 ; CHECK-NEXT: [[AND1:%[0-9]+]]:_(s32) = G_AND [[COPY1]], [[C1]]
671 ; CHECK-NEXT: [[ICMP:%[0-9]+]]:_(s32) = G_ICMP intpred(ugt), [[AND]](s32), [[AND1]]
672 ; CHECK-NEXT: $x10 = COPY [[ICMP]](s32)
673 ; CHECK-NEXT: PseudoRET implicit $x10
674 %0:_(s32) = COPY $x10
675 %1:_(s32) = COPY $x11
676 %2:_(s8) = G_TRUNC %0(s32)
677 %3:_(s8) = G_TRUNC %1(s32)
678 %4:_(s1) = G_ICMP intpred(ugt), %2(s8), %3
679 %5:_(s32) = G_ANYEXT %4(s1)
680 $x10 = COPY %5(s32)
681 PseudoRET implicit $x10
682
683 ...
684 ---
685 name: cmp_ugt_i16
686 body: |
687 bb.0.entry:
688 ; CHECK-LABEL: name: cmp_ugt_i16
689 ; CHECK: [[COPY:%[0-9]+]]:_(s32) = COPY $x10
690 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:_(s32) = COPY $x11
691 ; CHECK-NEXT: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 65535
692 ; CHECK-NEXT: [[AND:%[0-9]+]]:_(s32) = G_AND [[COPY]], [[C]]
693 ; CHECK-NEXT: [[C1:%[0-9]+]]:_(s32) = G_CONSTANT i32 65535
694 ; CHECK-NEXT: [[AND1:%[0-9]+]]:_(s32) = G_AND [[COPY1]], [[C1]]
695 ; CHECK-NEXT: [[ICMP:%[0-9]+]]:_(s32) = G_ICMP intpred(ugt), [[AND]](s32), [[AND1]]
696 ; CHECK-NEXT: $x10 = COPY [[ICMP]](s32)
697 ; CHECK-NEXT: PseudoRET implicit $x10
698 %0:_(s32) = COPY $x10
699 %1:_(s32) = COPY $x11
700 %2:_(s16) = G_TRUNC %0(s32)
701 %3:_(s16) = G_TRUNC %1(s32)
702 %4:_(s1) = G_ICMP intpred(ugt), %2(s16), %3
703 %5:_(s32) = G_ANYEXT %4(s1)
704 $x10 = COPY %5(s32)
705 PseudoRET implicit $x10
706
707 ...
708 ---
709 name: cmp_ugt_i32
710 body: |
711 bb.0.entry:
712 ; CHECK-LABEL: name: cmp_ugt_i32
713 ; CHECK: [[COPY:%[0-9]+]]:_(s32) = COPY $x10
714 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:_(s32) = COPY $x11
715 ; CHECK-NEXT: [[ICMP:%[0-9]+]]:_(s32) = G_ICMP intpred(ugt), [[COPY]](s32), [[COPY1]]
716 ; CHECK-NEXT: $x10 = COPY [[ICMP]](s32)
717 ; CHECK-NEXT: PseudoRET implicit $x10
718 %0:_(s32) = COPY $x10
719 %1:_(s32) = COPY $x11
720 %2:_(s1) = G_ICMP intpred(ugt), %0(s32), %1
721 %3:_(s32) = G_ANYEXT %2(s1)
722 $x10 = COPY %3(s32)
723 PseudoRET implicit $x10
724
725 ...
726 ---
727 name: cmp_ugt_i48
728 body: |
729 bb.0.entry:
730 ; CHECK-LABEL: name: cmp_ugt_i48
731 ; CHECK: %xhi:_(s32) = COPY $x10
732 ; CHECK-NEXT: %xlo:_(s32) = COPY $x11
733 ; CHECK-NEXT: %yhi:_(s32) = COPY $x12
734 ; CHECK-NEXT: %ylo:_(s32) = COPY $x13
735 ; CHECK-NEXT: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 -1
736 ; CHECK-NEXT: [[C1:%[0-9]+]]:_(s32) = G_CONSTANT i32 65535
737 ; CHECK-NEXT: [[AND:%[0-9]+]]:_(s32) = G_AND %xhi, [[C]]
738 ; CHECK-NEXT: [[AND1:%[0-9]+]]:_(s32) = G_AND %xlo, [[C1]]
739 ; CHECK-NEXT: [[C2:%[0-9]+]]:_(s32) = G_CONSTANT i32 -1
740 ; CHECK-NEXT: [[C3:%[0-9]+]]:_(s32) = G_CONSTANT i32 65535
741 ; CHECK-NEXT: [[AND2:%[0-9]+]]:_(s32) = G_AND %yhi, [[C2]]
742 ; CHECK-NEXT: [[AND3:%[0-9]+]]:_(s32) = G_AND %ylo, [[C3]]
743 ; CHECK-NEXT: [[ICMP:%[0-9]+]]:_(s32) = G_ICMP intpred(ugt), [[AND1]](s32), [[AND3]]
744 ; CHECK-NEXT: [[ICMP1:%[0-9]+]]:_(s32) = G_ICMP intpred(eq), [[AND1]](s32), [[AND3]]
745 ; CHECK-NEXT: [[ICMP2:%[0-9]+]]:_(s32) = G_ICMP intpred(ugt), [[AND]](s32), [[AND2]]
746 ; CHECK-NEXT: [[SELECT:%[0-9]+]]:_(s32) = G_SELECT [[ICMP1]](s32), [[ICMP2]], [[ICMP]]
747 ; CHECK-NEXT: $x10 = COPY [[SELECT]](s32)
748 ; CHECK-NEXT: PseudoRET implicit $x10
749 %xhi:_(s32) = COPY $x10
750 %xlo:_(s32) = COPY $x11
751 %yhi:_(s32) = COPY $x12
752 %ylo:_(s32) = COPY $x13
753 %x0:_(s64) = G_MERGE_VALUES %xhi(s32), %xlo(s32)
754 %y0:_(s64) = G_MERGE_VALUES %yhi(s32), %ylo(s32)
755 %x:_(s48) = G_TRUNC %x0(s64)
756 %y:_(s48) = G_TRUNC %y0(s64)
757 %z:_(s1) = G_ICMP intpred(ugt), %x(s48), %y
758 %z0:_(s32) = G_ANYEXT %z(s1)
759 $x10 = COPY %z0(s32)
760 PseudoRET implicit $x10
761
762 ...
763 ---
764 name: cmp_ugt_i64
765 body: |
766 bb.0.entry:
767 ; CHECK-LABEL: name: cmp_ugt_i64
768 ; CHECK: %xhi:_(s32) = COPY $x10
769 ; CHECK-NEXT: %xlo:_(s32) = COPY $x11
770 ; CHECK-NEXT: %yhi:_(s32) = COPY $x12
771 ; CHECK-NEXT: %ylo:_(s32) = COPY $x13
772 ; CHECK-NEXT: [[ICMP:%[0-9]+]]:_(s32) = G_ICMP intpred(ugt), %xlo(s32), %ylo
773 ; CHECK-NEXT: [[ICMP1:%[0-9]+]]:_(s32) = G_ICMP intpred(eq), %xlo(s32), %ylo
774 ; CHECK-NEXT: [[ICMP2:%[0-9]+]]:_(s32) = G_ICMP intpred(ugt), %xhi(s32), %yhi
775 ; CHECK-NEXT: [[SELECT:%[0-9]+]]:_(s32) = G_SELECT [[ICMP1]](s32), [[ICMP2]], [[ICMP]]
776 ; CHECK-NEXT: $x10 = COPY [[SELECT]](s32)
777 ; CHECK-NEXT: PseudoRET implicit $x10
778 %xhi:_(s32) = COPY $x10
779 %xlo:_(s32) = COPY $x11
780 %yhi:_(s32) = COPY $x12
781 %ylo:_(s32) = COPY $x13
782 %x:_(s64) = G_MERGE_VALUES %xhi(s32), %xlo(s32)
783 %y:_(s64) = G_MERGE_VALUES %yhi(s32), %ylo(s32)
784 %z:_(s1) = G_ICMP intpred(ugt), %x, %y
785 %z0:_(s32) = G_ANYEXT %z(s1)
786 $x10 = COPY %z0(s32)
787 PseudoRET implicit $x10
788
789 ...
790 ---
791 name: cmp_ult_i7
792 body: |
793 bb.0.entry:
794 ; CHECK-LABEL: name: cmp_ult_i7
795 ; CHECK: [[COPY:%[0-9]+]]:_(s32) = COPY $x10
796 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:_(s32) = COPY $x11
797 ; CHECK-NEXT: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 127
798 ; CHECK-NEXT: [[AND:%[0-9]+]]:_(s32) = G_AND [[COPY]], [[C]]
799 ; CHECK-NEXT: [[C1:%[0-9]+]]:_(s32) = G_CONSTANT i32 127
800 ; CHECK-NEXT: [[AND1:%[0-9]+]]:_(s32) = G_AND [[COPY1]], [[C1]]
801 ; CHECK-NEXT: [[ICMP:%[0-9]+]]:_(s32) = G_ICMP intpred(ult), [[AND]](s32), [[AND1]]
802 ; CHECK-NEXT: $x10 = COPY [[ICMP]](s32)
803 ; CHECK-NEXT: PseudoRET implicit $x10
804 %0:_(s32) = COPY $x10
805 %1:_(s32) = COPY $x11
806 %2:_(s7) = G_TRUNC %0(s32)
807 %3:_(s7) = G_TRUNC %1(s32)
808 %4:_(s1) = G_ICMP intpred(ult), %2(s7), %3
809 %5:_(s32) = G_ANYEXT %4(s1)
810 $x10 = COPY %5(s32)
811 PseudoRET implicit $x10
812
813 ...
814 ---
815 name: cmp_ult_i8
816 body: |
817 bb.0.entry:
818 ; CHECK-LABEL: name: cmp_ult_i8
819 ; CHECK: [[COPY:%[0-9]+]]:_(s32) = COPY $x10
820 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:_(s32) = COPY $x11
821 ; CHECK-NEXT: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 255
822 ; CHECK-NEXT: [[AND:%[0-9]+]]:_(s32) = G_AND [[COPY]], [[C]]
823 ; CHECK-NEXT: [[C1:%[0-9]+]]:_(s32) = G_CONSTANT i32 255
824 ; CHECK-NEXT: [[AND1:%[0-9]+]]:_(s32) = G_AND [[COPY1]], [[C1]]
825 ; CHECK-NEXT: [[ICMP:%[0-9]+]]:_(s32) = G_ICMP intpred(ult), [[AND]](s32), [[AND1]]
826 ; CHECK-NEXT: $x10 = COPY [[ICMP]](s32)
827 ; CHECK-NEXT: PseudoRET implicit $x10
828 %0:_(s32) = COPY $x10
829 %1:_(s32) = COPY $x11
830 %2:_(s8) = G_TRUNC %0(s32)
831 %3:_(s8) = G_TRUNC %1(s32)
832 %4:_(s1) = G_ICMP intpred(ult), %2(s8), %3
833 %5:_(s32) = G_ANYEXT %4(s1)
834 $x10 = COPY %5(s32)
835 PseudoRET implicit $x10
836
837 ...
838 ---
839 name: cmp_ult_i16
840 body: |
841 bb.0.entry:
842 ; CHECK-LABEL: name: cmp_ult_i16
843 ; CHECK: [[COPY:%[0-9]+]]:_(s32) = COPY $x10
844 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:_(s32) = COPY $x11
845 ; CHECK-NEXT: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 65535
846 ; CHECK-NEXT: [[AND:%[0-9]+]]:_(s32) = G_AND [[COPY]], [[C]]
847 ; CHECK-NEXT: [[C1:%[0-9]+]]:_(s32) = G_CONSTANT i32 65535
848 ; CHECK-NEXT: [[AND1:%[0-9]+]]:_(s32) = G_AND [[COPY1]], [[C1]]
849 ; CHECK-NEXT: [[ICMP:%[0-9]+]]:_(s32) = G_ICMP intpred(ult), [[AND]](s32), [[AND1]]
850 ; CHECK-NEXT: $x10 = COPY [[ICMP]](s32)
851 ; CHECK-NEXT: PseudoRET implicit $x10
852 %0:_(s32) = COPY $x10
853 %1:_(s32) = COPY $x11
854 %2:_(s16) = G_TRUNC %0(s32)
855 %3:_(s16) = G_TRUNC %1(s32)
856 %4:_(s1) = G_ICMP intpred(ult), %2(s16), %3
857 %5:_(s32) = G_ANYEXT %4(s1)
858 $x10 = COPY %5(s32)
859 PseudoRET implicit $x10
860
861 ...
862 ---
863 name: cmp_ult_i32
864 body: |
865 bb.0.entry:
866 ; CHECK-LABEL: name: cmp_ult_i32
867 ; CHECK: [[COPY:%[0-9]+]]:_(s32) = COPY $x10
868 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:_(s32) = COPY $x11
869 ; CHECK-NEXT: [[ICMP:%[0-9]+]]:_(s32) = G_ICMP intpred(ult), [[COPY]](s32), [[COPY1]]
870 ; CHECK-NEXT: $x10 = COPY [[ICMP]](s32)
871 ; CHECK-NEXT: PseudoRET implicit $x10
872 %0:_(s32) = COPY $x10
873 %1:_(s32) = COPY $x11
874 %2:_(s1) = G_ICMP intpred(ult), %0(s32), %1
875 %3:_(s32) = G_ANYEXT %2(s1)
876 $x10 = COPY %3(s32)
877 PseudoRET implicit $x10
878
879 ...
880 ---
881 name: cmp_ult_i48
882 body: |
883 bb.0.entry:
884 ; CHECK-LABEL: name: cmp_ult_i48
885 ; CHECK: %xhi:_(s32) = COPY $x10
886 ; CHECK-NEXT: %xlo:_(s32) = COPY $x11
887 ; CHECK-NEXT: %yhi:_(s32) = COPY $x12
888 ; CHECK-NEXT: %ylo:_(s32) = COPY $x13
889 ; CHECK-NEXT: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 -1
890 ; CHECK-NEXT: [[C1:%[0-9]+]]:_(s32) = G_CONSTANT i32 65535
891 ; CHECK-NEXT: [[AND:%[0-9]+]]:_(s32) = G_AND %xhi, [[C]]
892 ; CHECK-NEXT: [[AND1:%[0-9]+]]:_(s32) = G_AND %xlo, [[C1]]
893 ; CHECK-NEXT: [[C2:%[0-9]+]]:_(s32) = G_CONSTANT i32 -1
894 ; CHECK-NEXT: [[C3:%[0-9]+]]:_(s32) = G_CONSTANT i32 65535
895 ; CHECK-NEXT: [[AND2:%[0-9]+]]:_(s32) = G_AND %yhi, [[C2]]
896 ; CHECK-NEXT: [[AND3:%[0-9]+]]:_(s32) = G_AND %ylo, [[C3]]
897 ; CHECK-NEXT: [[ICMP:%[0-9]+]]:_(s32) = G_ICMP intpred(ult), [[AND1]](s32), [[AND3]]
898 ; CHECK-NEXT: [[ICMP1:%[0-9]+]]:_(s32) = G_ICMP intpred(eq), [[AND1]](s32), [[AND3]]
899 ; CHECK-NEXT: [[ICMP2:%[0-9]+]]:_(s32) = G_ICMP intpred(ult), [[AND]](s32), [[AND2]]
900 ; CHECK-NEXT: [[SELECT:%[0-9]+]]:_(s32) = G_SELECT [[ICMP1]](s32), [[ICMP2]], [[ICMP]]
901 ; CHECK-NEXT: $x10 = COPY [[SELECT]](s32)
902 ; CHECK-NEXT: PseudoRET implicit $x10
903 %xhi:_(s32) = COPY $x10
904 %xlo:_(s32) = COPY $x11
905 %yhi:_(s32) = COPY $x12
906 %ylo:_(s32) = COPY $x13
907 %x0:_(s64) = G_MERGE_VALUES %xhi(s32), %xlo(s32)
908 %y0:_(s64) = G_MERGE_VALUES %yhi(s32), %ylo(s32)
909 %x:_(s48) = G_TRUNC %x0(s64)
910 %y:_(s48) = G_TRUNC %y0(s64)
911 %z:_(s1) = G_ICMP intpred(ult), %x(s48), %y
912 %z0:_(s32) = G_ANYEXT %z(s1)
913 $x10 = COPY %z0(s32)
914 PseudoRET implicit $x10
915
916 ...
917 ---
918 name: cmp_ult_i64
919 body: |
920 bb.0.entry:
921 ; CHECK-LABEL: name: cmp_ult_i64
922 ; CHECK: %xhi:_(s32) = COPY $x10
923 ; CHECK-NEXT: %xlo:_(s32) = COPY $x11
924 ; CHECK-NEXT: %yhi:_(s32) = COPY $x12
925 ; CHECK-NEXT: %ylo:_(s32) = COPY $x13
926 ; CHECK-NEXT: [[ICMP:%[0-9]+]]:_(s32) = G_ICMP intpred(sge), %xlo(s32), %ylo
927 ; CHECK-NEXT: [[ICMP1:%[0-9]+]]:_(s32) = G_ICMP intpred(eq), %xlo(s32), %ylo
928 ; CHECK-NEXT: [[ICMP2:%[0-9]+]]:_(s32) = G_ICMP intpred(uge), %xhi(s32), %yhi
929 ; CHECK-NEXT: [[SELECT:%[0-9]+]]:_(s32) = G_SELECT [[ICMP1]](s32), [[ICMP2]], [[ICMP]]
930 ; CHECK-NEXT: $x10 = COPY [[SELECT]](s32)
931 ; CHECK-NEXT: PseudoRET implicit $x10
932 %xhi:_(s32) = COPY $x10
933 %xlo:_(s32) = COPY $x11
934 %yhi:_(s32) = COPY $x12
935 %ylo:_(s32) = COPY $x13
936 %x:_(s64) = G_MERGE_VALUES %xhi(s32), %xlo(s32)
937 %y:_(s64) = G_MERGE_VALUES %yhi(s32), %ylo(s32)
938 %z:_(s1) = G_ICMP intpred(sge), %x, %y
939 %z0:_(s32) = G_ANYEXT %z(s1)
940 $x10 = COPY %z0(s32)
941 PseudoRET implicit $x10
942
943 ...
944 ---
945 name: cmp_uge_i7
946 body: |
947 bb.0.entry:
948 ; CHECK-LABEL: name: cmp_uge_i7
949 ; CHECK: [[COPY:%[0-9]+]]:_(s32) = COPY $x10
950 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:_(s32) = COPY $x11
951 ; CHECK-NEXT: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 127
952 ; CHECK-NEXT: [[AND:%[0-9]+]]:_(s32) = G_AND [[COPY]], [[C]]
953 ; CHECK-NEXT: [[C1:%[0-9]+]]:_(s32) = G_CONSTANT i32 127
954 ; CHECK-NEXT: [[AND1:%[0-9]+]]:_(s32) = G_AND [[COPY1]], [[C1]]
955 ; CHECK-NEXT: [[ICMP:%[0-9]+]]:_(s32) = G_ICMP intpred(uge), [[AND]](s32), [[AND1]]
956 ; CHECK-NEXT: $x10 = COPY [[ICMP]](s32)
957 ; CHECK-NEXT: PseudoRET implicit $x10
958 %0:_(s32) = COPY $x10
959 %1:_(s32) = COPY $x11
960 %2:_(s7) = G_TRUNC %0(s32)
961 %3:_(s7) = G_TRUNC %1(s32)
962 %4:_(s1) = G_ICMP intpred(uge), %2(s7), %3
963 %5:_(s32) = G_ANYEXT %4(s1)
964 $x10 = COPY %5(s32)
965 PseudoRET implicit $x10
966
967 ...
968 ---
969 name: cmp_uge_i8
970 body: |
971 bb.0.entry:
972 ; CHECK-LABEL: name: cmp_uge_i8
973 ; CHECK: [[COPY:%[0-9]+]]:_(s32) = COPY $x10
974 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:_(s32) = COPY $x11
975 ; CHECK-NEXT: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 255
976 ; CHECK-NEXT: [[AND:%[0-9]+]]:_(s32) = G_AND [[COPY]], [[C]]
977 ; CHECK-NEXT: [[C1:%[0-9]+]]:_(s32) = G_CONSTANT i32 255
978 ; CHECK-NEXT: [[AND1:%[0-9]+]]:_(s32) = G_AND [[COPY1]], [[C1]]
979 ; CHECK-NEXT: [[ICMP:%[0-9]+]]:_(s32) = G_ICMP intpred(uge), [[AND]](s32), [[AND1]]
980 ; CHECK-NEXT: $x10 = COPY [[ICMP]](s32)
981 ; CHECK-NEXT: PseudoRET implicit $x10
982 %0:_(s32) = COPY $x10
983 %1:_(s32) = COPY $x11
984 %2:_(s8) = G_TRUNC %0(s32)
985 %3:_(s8) = G_TRUNC %1(s32)
986 %4:_(s1) = G_ICMP intpred(uge), %2(s8), %3
987 %5:_(s32) = G_ANYEXT %4(s1)
988 $x10 = COPY %5(s32)
989 PseudoRET implicit $x10
990
991 ...
992 ---
993 name: cmp_uge_i16
994 body: |
995 bb.0.entry:
996 ; CHECK-LABEL: name: cmp_uge_i16
997 ; CHECK: [[COPY:%[0-9]+]]:_(s32) = COPY $x10
998 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:_(s32) = COPY $x11
999 ; CHECK-NEXT: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 65535
1000 ; CHECK-NEXT: [[AND:%[0-9]+]]:_(s32) = G_AND [[COPY]], [[C]]
1001 ; CHECK-NEXT: [[C1:%[0-9]+]]:_(s32) = G_CONSTANT i32 65535
1002 ; CHECK-NEXT: [[AND1:%[0-9]+]]:_(s32) = G_AND [[COPY1]], [[C1]]
1003 ; CHECK-NEXT: [[ICMP:%[0-9]+]]:_(s32) = G_ICMP intpred(uge), [[AND]](s32), [[AND1]]
1004 ; CHECK-NEXT: $x10 = COPY [[ICMP]](s32)
1005 ; CHECK-NEXT: PseudoRET implicit $x10
1006 %0:_(s32) = COPY $x10
1007 %1:_(s32) = COPY $x11
1008 %2:_(s16) = G_TRUNC %0(s32)
1009 %3:_(s16) = G_TRUNC %1(s32)
1010 %4:_(s1) = G_ICMP intpred(uge), %2(s16), %3
1011 %5:_(s32) = G_ANYEXT %4(s1)
1012 $x10 = COPY %5(s32)
1013 PseudoRET implicit $x10
1014
1015 ...
1016 ---
1017 name: cmp_uge_i32
1018 body: |
1019 bb.0.entry:
1020 ; CHECK-LABEL: name: cmp_uge_i32
1021 ; CHECK: [[COPY:%[0-9]+]]:_(s32) = COPY $x10
1022 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:_(s32) = COPY $x11
1023 ; CHECK-NEXT: [[ICMP:%[0-9]+]]:_(s32) = G_ICMP intpred(uge), [[COPY]](s32), [[COPY1]]
1024 ; CHECK-NEXT: $x10 = COPY [[ICMP]](s32)
1025 ; CHECK-NEXT: PseudoRET implicit $x10
1026 %0:_(s32) = COPY $x10
1027 %1:_(s32) = COPY $x11
1028 %2:_(s1) = G_ICMP intpred(uge), %0(s32), %1
1029 %3:_(s32) = G_ANYEXT %2(s1)
1030 $x10 = COPY %3(s32)
1031 PseudoRET implicit $x10
1032
1033 ...
1034 ---
1035 name: cmp_uge_i48
1036 body: |
1037 bb.0.entry:
1038 ; CHECK-LABEL: name: cmp_uge_i48
1039 ; CHECK: %xhi:_(s32) = COPY $x10
1040 ; CHECK-NEXT: %xlo:_(s32) = COPY $x11
1041 ; CHECK-NEXT: %yhi:_(s32) = COPY $x12
1042 ; CHECK-NEXT: %ylo:_(s32) = COPY $x13
1043 ; CHECK-NEXT: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 -1
1044 ; CHECK-NEXT: [[C1:%[0-9]+]]:_(s32) = G_CONSTANT i32 65535
1045 ; CHECK-NEXT: [[AND:%[0-9]+]]:_(s32) = G_AND %xhi, [[C]]
1046 ; CHECK-NEXT: [[AND1:%[0-9]+]]:_(s32) = G_AND %xlo, [[C1]]
1047 ; CHECK-NEXT: [[C2:%[0-9]+]]:_(s32) = G_CONSTANT i32 -1
1048 ; CHECK-NEXT: [[C3:%[0-9]+]]:_(s32) = G_CONSTANT i32 65535
1049 ; CHECK-NEXT: [[AND2:%[0-9]+]]:_(s32) = G_AND %yhi, [[C2]]
1050 ; CHECK-NEXT: [[AND3:%[0-9]+]]:_(s32) = G_AND %ylo, [[C3]]
1051 ; CHECK-NEXT: [[ICMP:%[0-9]+]]:_(s32) = G_ICMP intpred(uge), [[AND1]](s32), [[AND3]]
1052 ; CHECK-NEXT: [[ICMP1:%[0-9]+]]:_(s32) = G_ICMP intpred(eq), [[AND1]](s32), [[AND3]]
1053 ; CHECK-NEXT: [[ICMP2:%[0-9]+]]:_(s32) = G_ICMP intpred(uge), [[AND]](s32), [[AND2]]
1054 ; CHECK-NEXT: [[SELECT:%[0-9]+]]:_(s32) = G_SELECT [[ICMP1]](s32), [[ICMP2]], [[ICMP]]
1055 ; CHECK-NEXT: $x10 = COPY [[SELECT]](s32)
1056 ; CHECK-NEXT: PseudoRET implicit $x10
1057 %xhi:_(s32) = COPY $x10
1058 %xlo:_(s32) = COPY $x11
1059 %yhi:_(s32) = COPY $x12
1060 %ylo:_(s32) = COPY $x13
1061 %x0:_(s64) = G_MERGE_VALUES %xhi(s32), %xlo(s32)
1062 %y0:_(s64) = G_MERGE_VALUES %yhi(s32), %ylo(s32)
1063 %x:_(s48) = G_TRUNC %x0(s64)
1064 %y:_(s48) = G_TRUNC %y0(s64)
1065 %z:_(s1) = G_ICMP intpred(uge), %x(s48), %y
1066 %z0:_(s32) = G_ANYEXT %z(s1)
1067 $x10 = COPY %z0(s32)
1068 PseudoRET implicit $x10
1069
1070 ...
1071 ---
1072 name: cmp_uge_i64
1073 body: |
1074 bb.0.entry:
1075 ; CHECK-LABEL: name: cmp_uge_i64
1076 ; CHECK: %xhi:_(s32) = COPY $x10
1077 ; CHECK-NEXT: %xlo:_(s32) = COPY $x11
1078 ; CHECK-NEXT: %yhi:_(s32) = COPY $x12
1079 ; CHECK-NEXT: %ylo:_(s32) = COPY $x13
1080 ; CHECK-NEXT: [[ICMP:%[0-9]+]]:_(s32) = G_ICMP intpred(uge), %xlo(s32), %ylo
1081 ; CHECK-NEXT: [[ICMP1:%[0-9]+]]:_(s32) = G_ICMP intpred(eq), %xlo(s32), %ylo
1082 ; CHECK-NEXT: [[ICMP2:%[0-9]+]]:_(s32) = G_ICMP intpred(uge), %xhi(s32), %yhi
1083 ; CHECK-NEXT: [[SELECT:%[0-9]+]]:_(s32) = G_SELECT [[ICMP1]](s32), [[ICMP2]], [[ICMP]]
1084 ; CHECK-NEXT: $x10 = COPY [[SELECT]](s32)
1085 ; CHECK-NEXT: PseudoRET implicit $x10
1086 %xhi:_(s32) = COPY $x10
1087 %xlo:_(s32) = COPY $x11
1088 %yhi:_(s32) = COPY $x12
1089 %ylo:_(s32) = COPY $x13
1090 %x:_(s64) = G_MERGE_VALUES %xhi(s32), %xlo(s32)
1091 %y:_(s64) = G_MERGE_VALUES %yhi(s32), %ylo(s32)
1092 %z:_(s1) = G_ICMP intpred(uge), %x, %y
1093 %z0:_(s32) = G_ANYEXT %z(s1)
1094 $x10 = COPY %z0(s32)
1095 PseudoRET implicit $x10
1096
1097 ...
1098 ---
1099 name: cmp_ule_i7
1100 body: |
1101 bb.0.entry:
1102 ; CHECK-LABEL: name: cmp_ule_i7
1103 ; CHECK: [[COPY:%[0-9]+]]:_(s32) = COPY $x10
1104 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:_(s32) = COPY $x11
1105 ; CHECK-NEXT: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 127
1106 ; CHECK-NEXT: [[AND:%[0-9]+]]:_(s32) = G_AND [[COPY]], [[C]]
1107 ; CHECK-NEXT: [[C1:%[0-9]+]]:_(s32) = G_CONSTANT i32 127
1108 ; CHECK-NEXT: [[AND1:%[0-9]+]]:_(s32) = G_AND [[COPY1]], [[C1]]
1109 ; CHECK-NEXT: [[ICMP:%[0-9]+]]:_(s32) = G_ICMP intpred(ule), [[AND]](s32), [[AND1]]
1110 ; CHECK-NEXT: $x10 = COPY [[ICMP]](s32)
1111 ; CHECK-NEXT: PseudoRET implicit $x10
1112 %0:_(s32) = COPY $x10
1113 %1:_(s32) = COPY $x11
1114 %2:_(s7) = G_TRUNC %0(s32)
1115 %3:_(s7) = G_TRUNC %1(s32)
1116 %4:_(s1) = G_ICMP intpred(ule), %2(s7), %3
1117 %5:_(s32) = G_ANYEXT %4(s1)
1118 $x10 = COPY %5(s32)
1119 PseudoRET implicit $x10
1120
1121 ...
1122 ---
1123 name: cmp_ule_i8
1124 body: |
1125 bb.0.entry:
1126 ; CHECK-LABEL: name: cmp_ule_i8
1127 ; CHECK: [[COPY:%[0-9]+]]:_(s32) = COPY $x10
1128 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:_(s32) = COPY $x11
1129 ; CHECK-NEXT: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 255
1130 ; CHECK-NEXT: [[AND:%[0-9]+]]:_(s32) = G_AND [[COPY]], [[C]]
1131 ; CHECK-NEXT: [[C1:%[0-9]+]]:_(s32) = G_CONSTANT i32 255
1132 ; CHECK-NEXT: [[AND1:%[0-9]+]]:_(s32) = G_AND [[COPY1]], [[C1]]
1133 ; CHECK-NEXT: [[ICMP:%[0-9]+]]:_(s32) = G_ICMP intpred(ule), [[AND]](s32), [[AND1]]
1134 ; CHECK-NEXT: $x10 = COPY [[ICMP]](s32)
1135 ; CHECK-NEXT: PseudoRET implicit $x10
1136 %0:_(s32) = COPY $x10
1137 %1:_(s32) = COPY $x11
1138 %2:_(s8) = G_TRUNC %0(s32)
1139 %3:_(s8) = G_TRUNC %1(s32)
1140 %4:_(s1) = G_ICMP intpred(ule), %2(s8), %3
1141 %5:_(s32) = G_ANYEXT %4(s1)
1142 $x10 = COPY %5(s32)
1143 PseudoRET implicit $x10
1144
1145 ...
1146 ---
1147 name: cmp_ule_i16
1148 body: |
1149 bb.0.entry:
1150 ; CHECK-LABEL: name: cmp_ule_i16
1151 ; CHECK: [[COPY:%[0-9]+]]:_(s32) = COPY $x10
1152 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:_(s32) = COPY $x11
1153 ; CHECK-NEXT: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 65535
1154 ; CHECK-NEXT: [[AND:%[0-9]+]]:_(s32) = G_AND [[COPY]], [[C]]
1155 ; CHECK-NEXT: [[C1:%[0-9]+]]:_(s32) = G_CONSTANT i32 65535
1156 ; CHECK-NEXT: [[AND1:%[0-9]+]]:_(s32) = G_AND [[COPY1]], [[C1]]
1157 ; CHECK-NEXT: [[ICMP:%[0-9]+]]:_(s32) = G_ICMP intpred(ule), [[AND]](s32), [[AND1]]
1158 ; CHECK-NEXT: $x10 = COPY [[ICMP]](s32)
1159 ; CHECK-NEXT: PseudoRET implicit $x10
1160 %0:_(s32) = COPY $x10
1161 %1:_(s32) = COPY $x11
1162 %2:_(s16) = G_TRUNC %0(s32)
1163 %3:_(s16) = G_TRUNC %1(s32)
1164 %4:_(s1) = G_ICMP intpred(ule), %2(s16), %3
1165 %5:_(s32) = G_ANYEXT %4(s1)
1166 $x10 = COPY %5(s32)
1167 PseudoRET implicit $x10
1168
1169 ...
1170 ---
1171 name: cmp_ule_i32
1172 body: |
1173 bb.0.entry:
1174 ; CHECK-LABEL: name: cmp_ule_i32
1175 ; CHECK: [[COPY:%[0-9]+]]:_(s32) = COPY $x10
1176 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:_(s32) = COPY $x11
1177 ; CHECK-NEXT: [[ICMP:%[0-9]+]]:_(s32) = G_ICMP intpred(ule), [[COPY]](s32), [[COPY1]]
1178 ; CHECK-NEXT: $x10 = COPY [[ICMP]](s32)
1179 ; CHECK-NEXT: PseudoRET implicit $x10
1180 %0:_(s32) = COPY $x10
1181 %1:_(s32) = COPY $x11
1182 %2:_(s1) = G_ICMP intpred(ule), %0(s32), %1
1183 %3:_(s32) = G_ANYEXT %2(s1)
1184 $x10 = COPY %3(s32)
1185 PseudoRET implicit $x10
1186
1187 ...
1188 ---
1189 name: cmp_ule_i48
1190 body: |
1191 bb.0.entry:
1192 ; CHECK-LABEL: name: cmp_ule_i48
1193 ; CHECK: %xhi:_(s32) = COPY $x10
1194 ; CHECK-NEXT: %xlo:_(s32) = COPY $x11
1195 ; CHECK-NEXT: %yhi:_(s32) = COPY $x12
1196 ; CHECK-NEXT: %ylo:_(s32) = COPY $x13
1197 ; CHECK-NEXT: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 -1
1198 ; CHECK-NEXT: [[C1:%[0-9]+]]:_(s32) = G_CONSTANT i32 65535
1199 ; CHECK-NEXT: [[AND:%[0-9]+]]:_(s32) = G_AND %xhi, [[C]]
1200 ; CHECK-NEXT: [[AND1:%[0-9]+]]:_(s32) = G_AND %xlo, [[C1]]
1201 ; CHECK-NEXT: [[C2:%[0-9]+]]:_(s32) = G_CONSTANT i32 -1
1202 ; CHECK-NEXT: [[C3:%[0-9]+]]:_(s32) = G_CONSTANT i32 65535
1203 ; CHECK-NEXT: [[AND2:%[0-9]+]]:_(s32) = G_AND %yhi, [[C2]]
1204 ; CHECK-NEXT: [[AND3:%[0-9]+]]:_(s32) = G_AND %ylo, [[C3]]
1205 ; CHECK-NEXT: [[ICMP:%[0-9]+]]:_(s32) = G_ICMP intpred(ule), [[AND1]](s32), [[AND3]]
1206 ; CHECK-NEXT: [[ICMP1:%[0-9]+]]:_(s32) = G_ICMP intpred(eq), [[AND1]](s32), [[AND3]]
1207 ; CHECK-NEXT: [[ICMP2:%[0-9]+]]:_(s32) = G_ICMP intpred(ule), [[AND]](s32), [[AND2]]
1208 ; CHECK-NEXT: [[SELECT:%[0-9]+]]:_(s32) = G_SELECT [[ICMP1]](s32), [[ICMP2]], [[ICMP]]
1209 ; CHECK-NEXT: $x10 = COPY [[SELECT]](s32)
1210 ; CHECK-NEXT: PseudoRET implicit $x10
1211 %xhi:_(s32) = COPY $x10
1212 %xlo:_(s32) = COPY $x11
1213 %yhi:_(s32) = COPY $x12
1214 %ylo:_(s32) = COPY $x13
1215 %x0:_(s64) = G_MERGE_VALUES %xhi(s32), %xlo(s32)
1216 %y0:_(s64) = G_MERGE_VALUES %yhi(s32), %ylo(s32)
1217 %x:_(s48) = G_TRUNC %x0(s64)
1218 %y:_(s48) = G_TRUNC %y0(s64)
1219 %z:_(s1) = G_ICMP intpred(ule), %x(s48), %y
1220 %z0:_(s32) = G_ANYEXT %z(s1)
1221 $x10 = COPY %z0(s32)
1222 PseudoRET implicit $x10
1223
1224 ...
1225 ---
1226 name: cmp_ule_i64
1227 body: |
1228 bb.0.entry:
1229 ; CHECK-LABEL: name: cmp_ule_i64
1230 ; CHECK: %xhi:_(s32) = COPY $x10
1231 ; CHECK-NEXT: %xlo:_(s32) = COPY $x11
1232 ; CHECK-NEXT: %yhi:_(s32) = COPY $x12
1233 ; CHECK-NEXT: %ylo:_(s32) = COPY $x13
1234 ; CHECK-NEXT: [[ICMP:%[0-9]+]]:_(s32) = G_ICMP intpred(ule), %xlo(s32), %ylo
1235 ; CHECK-NEXT: [[ICMP1:%[0-9]+]]:_(s32) = G_ICMP intpred(eq), %xlo(s32), %ylo
1236 ; CHECK-NEXT: [[ICMP2:%[0-9]+]]:_(s32) = G_ICMP intpred(ule), %xhi(s32), %yhi
1237 ; CHECK-NEXT: [[SELECT:%[0-9]+]]:_(s32) = G_SELECT [[ICMP1]](s32), [[ICMP2]], [[ICMP]]
1238 ; CHECK-NEXT: $x10 = COPY [[SELECT]](s32)
1239 ; CHECK-NEXT: PseudoRET implicit $x10
1240 %xhi:_(s32) = COPY $x10
1241 %xlo:_(s32) = COPY $x11
1242 %yhi:_(s32) = COPY $x12
1243 %ylo:_(s32) = COPY $x13
1244 %x:_(s64) = G_MERGE_VALUES %xhi(s32), %xlo(s32)
1245 %y:_(s64) = G_MERGE_VALUES %yhi(s32), %ylo(s32)
1246 %z:_(s1) = G_ICMP intpred(ule), %x, %y
1247 %z0:_(s32) = G_ANYEXT %z(s1)
1248 $x10 = COPY %z0(s32)
1249 PseudoRET implicit $x10
1250
1251 ...
1252 ---
1253 name: cmp_eq_i7
1254 body: |
1255 bb.0.entry:
1256 ; CHECK-LABEL: name: cmp_eq_i7
1257 ; CHECK: [[COPY:%[0-9]+]]:_(s32) = COPY $x10
1258 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:_(s32) = COPY $x11
1259 ; CHECK-NEXT: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 127
1260 ; CHECK-NEXT: [[AND:%[0-9]+]]:_(s32) = G_AND [[COPY]], [[C]]
1261 ; CHECK-NEXT: [[C1:%[0-9]+]]:_(s32) = G_CONSTANT i32 127
1262 ; CHECK-NEXT: [[AND1:%[0-9]+]]:_(s32) = G_AND [[COPY1]], [[C1]]
1263 ; CHECK-NEXT: [[ICMP:%[0-9]+]]:_(s32) = G_ICMP intpred(eq), [[AND]](s32), [[AND1]]
1264 ; CHECK-NEXT: $x10 = COPY [[ICMP]](s32)
1265 ; CHECK-NEXT: PseudoRET implicit $x10
1266 %0:_(s32) = COPY $x10
1267 %1:_(s32) = COPY $x11
1268 %2:_(s7) = G_TRUNC %0(s32)
1269 %3:_(s7) = G_TRUNC %1(s32)
1270 %4:_(s1) = G_ICMP intpred(eq), %2(s7), %3
1271 %5:_(s32) = G_ANYEXT %4(s1)
1272 $x10 = COPY %5(s32)
1273 PseudoRET implicit $x10
1274
1275 ...
1276 ---
1277 name: cmp_eq_i8
1278 body: |
1279 bb.0.entry:
1280 ; CHECK-LABEL: name: cmp_eq_i8
1281 ; CHECK: [[COPY:%[0-9]+]]:_(s32) = COPY $x10
1282 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:_(s32) = COPY $x11
1283 ; CHECK-NEXT: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 255
1284 ; CHECK-NEXT: [[AND:%[0-9]+]]:_(s32) = G_AND [[COPY]], [[C]]
1285 ; CHECK-NEXT: [[C1:%[0-9]+]]:_(s32) = G_CONSTANT i32 255
1286 ; CHECK-NEXT: [[AND1:%[0-9]+]]:_(s32) = G_AND [[COPY1]], [[C1]]
1287 ; CHECK-NEXT: [[ICMP:%[0-9]+]]:_(s32) = G_ICMP intpred(eq), [[AND]](s32), [[AND1]]
1288 ; CHECK-NEXT: $x10 = COPY [[ICMP]](s32)
1289 ; CHECK-NEXT: PseudoRET implicit $x10
1290 %0:_(s32) = COPY $x10
1291 %1:_(s32) = COPY $x11
1292 %2:_(s8) = G_TRUNC %0(s32)
1293 %3:_(s8) = G_TRUNC %1(s32)
1294 %4:_(s1) = G_ICMP intpred(eq), %2(s8), %3
1295 %5:_(s32) = G_ANYEXT %4(s1)
1296 $x10 = COPY %5(s32)
1297 PseudoRET implicit $x10
1298
1299 ...
1300 ---
1301 name: cmp_eq_i16
1302 body: |
1303 bb.0.entry:
1304 ; CHECK-LABEL: name: cmp_eq_i16
1305 ; CHECK: [[COPY:%[0-9]+]]:_(s32) = COPY $x10
1306 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:_(s32) = COPY $x11
1307 ; CHECK-NEXT: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 65535
1308 ; CHECK-NEXT: [[AND:%[0-9]+]]:_(s32) = G_AND [[COPY]], [[C]]
1309 ; CHECK-NEXT: [[C1:%[0-9]+]]:_(s32) = G_CONSTANT i32 65535
1310 ; CHECK-NEXT: [[AND1:%[0-9]+]]:_(s32) = G_AND [[COPY1]], [[C1]]
1311 ; CHECK-NEXT: [[ICMP:%[0-9]+]]:_(s32) = G_ICMP intpred(eq), [[AND]](s32), [[AND1]]
1312 ; CHECK-NEXT: $x10 = COPY [[ICMP]](s32)
1313 ; CHECK-NEXT: PseudoRET implicit $x10
1314 %0:_(s32) = COPY $x10
1315 %1:_(s32) = COPY $x11
1316 %2:_(s16) = G_TRUNC %0(s32)
1317 %3:_(s16) = G_TRUNC %1(s32)
1318 %4:_(s1) = G_ICMP intpred(eq), %2(s16), %3
1319 %5:_(s32) = G_ANYEXT %4(s1)
1320 $x10 = COPY %5(s32)
1321 PseudoRET implicit $x10
1322
1323 ...
1324 ---
1325 name: cmp_eq_i32
1326 body: |
1327 bb.0.entry:
1328 ; CHECK-LABEL: name: cmp_eq_i32
1329 ; CHECK: [[COPY:%[0-9]+]]:_(s32) = COPY $x10
1330 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:_(s32) = COPY $x11
1331 ; CHECK-NEXT: [[ICMP:%[0-9]+]]:_(s32) = G_ICMP intpred(eq), [[COPY]](s32), [[COPY1]]
1332 ; CHECK-NEXT: $x10 = COPY [[ICMP]](s32)
1333 ; CHECK-NEXT: PseudoRET implicit $x10
1334 %0:_(s32) = COPY $x10
1335 %1:_(s32) = COPY $x11
1336 %2:_(s1) = G_ICMP intpred(eq), %0(s32), %1
1337 %3:_(s32) = G_ANYEXT %2(s1)
1338 $x10 = COPY %3(s32)
1339 PseudoRET implicit $x10
1340
1341 ...
1342 ---
1343 name: cmp_eq_i48
1344 body: |
1345 bb.0.entry:
1346 ; CHECK-LABEL: name: cmp_eq_i48
1347 ; CHECK: %xhi:_(s32) = COPY $x10
1348 ; CHECK-NEXT: %xlo:_(s32) = COPY $x11
1349 ; CHECK-NEXT: %yhi:_(s32) = COPY $x12
1350 ; CHECK-NEXT: %ylo:_(s32) = COPY $x13
1351 ; CHECK-NEXT: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 -1
1352 ; CHECK-NEXT: [[C1:%[0-9]+]]:_(s32) = G_CONSTANT i32 65535
1353 ; CHECK-NEXT: [[AND:%[0-9]+]]:_(s32) = G_AND %xhi, [[C]]
1354 ; CHECK-NEXT: [[AND1:%[0-9]+]]:_(s32) = G_AND %xlo, [[C1]]
1355 ; CHECK-NEXT: [[C2:%[0-9]+]]:_(s32) = G_CONSTANT i32 -1
1356 ; CHECK-NEXT: [[C3:%[0-9]+]]:_(s32) = G_CONSTANT i32 65535
1357 ; CHECK-NEXT: [[AND2:%[0-9]+]]:_(s32) = G_AND %yhi, [[C2]]
1358 ; CHECK-NEXT: [[AND3:%[0-9]+]]:_(s32) = G_AND %ylo, [[C3]]
1359 ; CHECK-NEXT: [[C4:%[0-9]+]]:_(s32) = G_CONSTANT i32 0
1360 ; CHECK-NEXT: [[XOR:%[0-9]+]]:_(s32) = G_XOR [[AND]], [[AND2]]
1361 ; CHECK-NEXT: [[XOR1:%[0-9]+]]:_(s32) = G_XOR [[AND1]], [[AND3]]
1362 ; CHECK-NEXT: [[OR:%[0-9]+]]:_(s32) = G_OR [[XOR]], [[XOR1]]
1363 ; CHECK-NEXT: [[ICMP:%[0-9]+]]:_(s32) = G_ICMP intpred(eq), [[OR]](s32), [[C4]]
1364 ; CHECK-NEXT: $x10 = COPY [[ICMP]](s32)
1365 ; CHECK-NEXT: PseudoRET implicit $x10
1366 %xhi:_(s32) = COPY $x10
1367 %xlo:_(s32) = COPY $x11
1368 %yhi:_(s32) = COPY $x12
1369 %ylo:_(s32) = COPY $x13
1370 %x0:_(s64) = G_MERGE_VALUES %xhi(s32), %xlo(s32)
1371 %y0:_(s64) = G_MERGE_VALUES %yhi(s32), %ylo(s32)
1372 %x:_(s48) = G_TRUNC %x0(s64)
1373 %y:_(s48) = G_TRUNC %y0(s64)
1374 %z:_(s1) = G_ICMP intpred(eq), %x(s48), %y
1375 %z0:_(s32) = G_ANYEXT %z(s1)
1376 $x10 = COPY %z0(s32)
1377 PseudoRET implicit $x10
1378
1379 ...
1380 ---
1381 name: cmp_eq_i64
1382 body: |
1383 bb.0.entry:
1384 ; CHECK-LABEL: name: cmp_eq_i64
1385 ; CHECK: %xhi:_(s32) = COPY $x10
1386 ; CHECK-NEXT: %xlo:_(s32) = COPY $x11
1387 ; CHECK-NEXT: %yhi:_(s32) = COPY $x12
1388 ; CHECK-NEXT: %ylo:_(s32) = COPY $x13
1389 ; CHECK-NEXT: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 0
1390 ; CHECK-NEXT: [[XOR:%[0-9]+]]:_(s32) = G_XOR %xhi, %yhi
1391 ; CHECK-NEXT: [[XOR1:%[0-9]+]]:_(s32) = G_XOR %xlo, %ylo
1392 ; CHECK-NEXT: [[OR:%[0-9]+]]:_(s32) = G_OR [[XOR]], [[XOR1]]
1393 ; CHECK-NEXT: [[ICMP:%[0-9]+]]:_(s32) = G_ICMP intpred(eq), [[OR]](s32), [[C]]
1394 ; CHECK-NEXT: $x10 = COPY [[ICMP]](s32)
1395 ; CHECK-NEXT: PseudoRET implicit $x10
1396 %xhi:_(s32) = COPY $x10
1397 %xlo:_(s32) = COPY $x11
1398 %yhi:_(s32) = COPY $x12
1399 %ylo:_(s32) = COPY $x13
1400 %x:_(s64) = G_MERGE_VALUES %xhi(s32), %xlo(s32)
1401 %y:_(s64) = G_MERGE_VALUES %yhi(s32), %ylo(s32)
1402 %z:_(s1) = G_ICMP intpred(eq), %x, %y
1403 %z0:_(s32) = G_ANYEXT %z(s1)
1404 $x10 = COPY %z0(s32)
1405 PseudoRET implicit $x10
1406
1407 ...
1408 ---
1409 name: cmp_ne_i7
1410 body: |
1411 bb.0.entry:
1412 ; CHECK-LABEL: name: cmp_ne_i7
1413 ; CHECK: [[COPY:%[0-9]+]]:_(s32) = COPY $x10
1414 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:_(s32) = COPY $x11
1415 ; CHECK-NEXT: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 127
1416 ; CHECK-NEXT: [[AND:%[0-9]+]]:_(s32) = G_AND [[COPY]], [[C]]
1417 ; CHECK-NEXT: [[C1:%[0-9]+]]:_(s32) = G_CONSTANT i32 127
1418 ; CHECK-NEXT: [[AND1:%[0-9]+]]:_(s32) = G_AND [[COPY1]], [[C1]]
1419 ; CHECK-NEXT: [[ICMP:%[0-9]+]]:_(s32) = G_ICMP intpred(ne), [[AND]](s32), [[AND1]]
1420 ; CHECK-NEXT: $x10 = COPY [[ICMP]](s32)
1421 ; CHECK-NEXT: PseudoRET implicit $x10
1422 %0:_(s32) = COPY $x10
1423 %1:_(s32) = COPY $x11
1424 %2:_(s7) = G_TRUNC %0(s32)
1425 %3:_(s7) = G_TRUNC %1(s32)
1426 %4:_(s1) = G_ICMP intpred(ne), %2(s7), %3
1427 %5:_(s32) = G_ANYEXT %4(s1)
1428 $x10 = COPY %5(s32)
1429 PseudoRET implicit $x10
1430
1431 ...
1432 ---
1433 name: cmp_ne_i8
1434 body: |
1435 bb.0.entry:
1436 ; CHECK-LABEL: name: cmp_ne_i8
1437 ; CHECK: [[COPY:%[0-9]+]]:_(s32) = COPY $x10
1438 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:_(s32) = COPY $x11
1439 ; CHECK-NEXT: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 255
1440 ; CHECK-NEXT: [[AND:%[0-9]+]]:_(s32) = G_AND [[COPY]], [[C]]
1441 ; CHECK-NEXT: [[C1:%[0-9]+]]:_(s32) = G_CONSTANT i32 255
1442 ; CHECK-NEXT: [[AND1:%[0-9]+]]:_(s32) = G_AND [[COPY1]], [[C1]]
1443 ; CHECK-NEXT: [[ICMP:%[0-9]+]]:_(s32) = G_ICMP intpred(ne), [[AND]](s32), [[AND1]]
1444 ; CHECK-NEXT: $x10 = COPY [[ICMP]](s32)
1445 ; CHECK-NEXT: PseudoRET implicit $x10
1446 %0:_(s32) = COPY $x10
1447 %1:_(s32) = COPY $x11
1448 %2:_(s8) = G_TRUNC %0(s32)
1449 %3:_(s8) = G_TRUNC %1(s32)
1450 %4:_(s1) = G_ICMP intpred(ne), %2(s8), %3
1451 %5:_(s32) = G_ANYEXT %4(s1)
1452 $x10 = COPY %5(s32)
1453 PseudoRET implicit $x10
1454
1455 ...
1456 ---
1457 name: cmp_ne_i16
1458 body: |
1459 bb.0.entry:
1460 ; CHECK-LABEL: name: cmp_ne_i16
1461 ; CHECK: [[COPY:%[0-9]+]]:_(s32) = COPY $x10
1462 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:_(s32) = COPY $x11
1463 ; CHECK-NEXT: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 65535
1464 ; CHECK-NEXT: [[AND:%[0-9]+]]:_(s32) = G_AND [[COPY]], [[C]]
1465 ; CHECK-NEXT: [[C1:%[0-9]+]]:_(s32) = G_CONSTANT i32 65535
1466 ; CHECK-NEXT: [[AND1:%[0-9]+]]:_(s32) = G_AND [[COPY1]], [[C1]]
1467 ; CHECK-NEXT: [[ICMP:%[0-9]+]]:_(s32) = G_ICMP intpred(ne), [[AND]](s32), [[AND1]]
1468 ; CHECK-NEXT: $x10 = COPY [[ICMP]](s32)
1469 ; CHECK-NEXT: PseudoRET implicit $x10
1470 %0:_(s32) = COPY $x10
1471 %1:_(s32) = COPY $x11
1472 %2:_(s16) = G_TRUNC %0(s32)
1473 %3:_(s16) = G_TRUNC %1(s32)
1474 %4:_(s1) = G_ICMP intpred(ne), %2(s16), %3
1475 %5:_(s32) = G_ANYEXT %4(s1)
1476 $x10 = COPY %5(s32)
1477 PseudoRET implicit $x10
1478
1479 ...
1480 ---
1481 name: cmp_ne_i32
1482 body: |
1483 bb.0.entry:
1484 ; CHECK-LABEL: name: cmp_ne_i32
1485 ; CHECK: [[COPY:%[0-9]+]]:_(s32) = COPY $x10
1486 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:_(s32) = COPY $x11
1487 ; CHECK-NEXT: [[ICMP:%[0-9]+]]:_(s32) = G_ICMP intpred(ne), [[COPY]](s32), [[COPY1]]
1488 ; CHECK-NEXT: $x10 = COPY [[ICMP]](s32)
1489 ; CHECK-NEXT: PseudoRET implicit $x10
1490 %0:_(s32) = COPY $x10
1491 %1:_(s32) = COPY $x11
1492 %2:_(s1) = G_ICMP intpred(ne), %0(s32), %1
1493 %3:_(s32) = G_ANYEXT %2(s1)
1494 $x10 = COPY %3(s32)
1495 PseudoRET implicit $x10
1496
1497 ...
1498 ---
1499 name: cmp_ne_i48
1500 body: |
1501 bb.0.entry:
1502 ; CHECK-LABEL: name: cmp_ne_i48
1503 ; CHECK: %xhi:_(s32) = COPY $x10
1504 ; CHECK-NEXT: %xlo:_(s32) = COPY $x11
1505 ; CHECK-NEXT: %yhi:_(s32) = COPY $x12
1506 ; CHECK-NEXT: %ylo:_(s32) = COPY $x13
1507 ; CHECK-NEXT: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 -1
1508 ; CHECK-NEXT: [[C1:%[0-9]+]]:_(s32) = G_CONSTANT i32 65535
1509 ; CHECK-NEXT: [[AND:%[0-9]+]]:_(s32) = G_AND %xhi, [[C]]
1510 ; CHECK-NEXT: [[AND1:%[0-9]+]]:_(s32) = G_AND %xlo, [[C1]]
1511 ; CHECK-NEXT: [[C2:%[0-9]+]]:_(s32) = G_CONSTANT i32 -1
1512 ; CHECK-NEXT: [[C3:%[0-9]+]]:_(s32) = G_CONSTANT i32 65535
1513 ; CHECK-NEXT: [[AND2:%[0-9]+]]:_(s32) = G_AND %yhi, [[C2]]
1514 ; CHECK-NEXT: [[AND3:%[0-9]+]]:_(s32) = G_AND %ylo, [[C3]]
1515 ; CHECK-NEXT: [[C4:%[0-9]+]]:_(s32) = G_CONSTANT i32 0
1516 ; CHECK-NEXT: [[XOR:%[0-9]+]]:_(s32) = G_XOR [[AND]], [[AND2]]
1517 ; CHECK-NEXT: [[XOR1:%[0-9]+]]:_(s32) = G_XOR [[AND1]], [[AND3]]
1518 ; CHECK-NEXT: [[OR:%[0-9]+]]:_(s32) = G_OR [[XOR]], [[XOR1]]
1519 ; CHECK-NEXT: [[ICMP:%[0-9]+]]:_(s32) = G_ICMP intpred(ne), [[OR]](s32), [[C4]]
1520 ; CHECK-NEXT: $x10 = COPY [[ICMP]](s32)
1521 ; CHECK-NEXT: PseudoRET implicit $x10
1522 %xhi:_(s32) = COPY $x10
1523 %xlo:_(s32) = COPY $x11
1524 %yhi:_(s32) = COPY $x12
1525 %ylo:_(s32) = COPY $x13
1526 %x0:_(s64) = G_MERGE_VALUES %xhi(s32), %xlo(s32)
1527 %y0:_(s64) = G_MERGE_VALUES %yhi(s32), %ylo(s32)
1528 %x:_(s48) = G_TRUNC %x0(s64)
1529 %y:_(s48) = G_TRUNC %y0(s64)
1530 %z:_(s1) = G_ICMP intpred(ne), %x(s48), %y
1531 %z0:_(s32) = G_ANYEXT %z(s1)
1532 $x10 = COPY %z0(s32)
1533 PseudoRET implicit $x10
1534
1535 ...
1536 ---
1537 name: cmp_ne_i64
1538 body: |
1539 bb.0.entry:
1540 ; CHECK-LABEL: name: cmp_ne_i64
1541 ; CHECK: %xhi:_(s32) = COPY $x10
1542 ; CHECK-NEXT: %xlo:_(s32) = COPY $x11
1543 ; CHECK-NEXT: %yhi:_(s32) = COPY $x12
1544 ; CHECK-NEXT: %ylo:_(s32) = COPY $x13
1545 ; CHECK-NEXT: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 0
1546 ; CHECK-NEXT: [[XOR:%[0-9]+]]:_(s32) = G_XOR %xhi, %yhi
1547 ; CHECK-NEXT: [[XOR1:%[0-9]+]]:_(s32) = G_XOR %xlo, %ylo
1548 ; CHECK-NEXT: [[OR:%[0-9]+]]:_(s32) = G_OR [[XOR]], [[XOR1]]
1549 ; CHECK-NEXT: [[ICMP:%[0-9]+]]:_(s32) = G_ICMP intpred(ne), [[OR]](s32), [[C]]
1550 ; CHECK-NEXT: $x10 = COPY [[ICMP]](s32)
1551 ; CHECK-NEXT: PseudoRET implicit $x10
1552 %xhi:_(s32) = COPY $x10
1553 %xlo:_(s32) = COPY $x11
1554 %yhi:_(s32) = COPY $x12
1555 %ylo:_(s32) = COPY $x13
1556 %x:_(s64) = G_MERGE_VALUES %xhi(s32), %xlo(s32)
1557 %y:_(s64) = G_MERGE_VALUES %yhi(s32), %ylo(s32)
1558 %z:_(s1) = G_ICMP intpred(ne), %x, %y
1559 %z0:_(s32) = G_ANYEXT %z(s1)
1560 $x10 = COPY %z0(s32)
1561 PseudoRET implicit $x10
1562
1563 ...
1564 ---
1565 name: cmp_eq_ptr
1566 body: |
1567 bb.0.entry:
1568 ; CHECK-LABEL: name: cmp_eq_ptr
1569 ; CHECK: [[COPY:%[0-9]+]]:_(p0) = COPY $x10
1570 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:_(p0) = COPY $x11
1571 ; CHECK-NEXT: [[ICMP:%[0-9]+]]:_(s32) = G_ICMP intpred(eq), [[COPY]](p0), [[COPY1]]
1572 ; CHECK-NEXT: $x10 = COPY [[ICMP]](s32)
1573 ; CHECK-NEXT: PseudoRET implicit $x10
1574 %0:_(p0) = COPY $x10
1575 %1:_(p0) = COPY $x11
1576 %2:_(s1) = G_ICMP intpred(eq), %0(p0), %1
1577 %3:_(s32) = G_ANYEXT %2(s1)
1578 $x10 = COPY %3(s32)
1579 PseudoRET implicit $x10
1580
1581 ...