Debian Codegraph @

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

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