1 # NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py
2 # RUN: llc -O0 -mtriple=aarch64 -run-pass=legalizer -global-isel-abort=1 -verify-machineinstrs %s -o - | FileCheck %s
7 ; CHECK-LABEL: name: test_icmp
8 ; CHECK: [[COPY:%[0-9]+]]:_(s64) = COPY $x0
9 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:_(s64) = COPY $x0
10 ; CHECK-NEXT: [[ICMP:%[0-9]+]]:_(s32) = G_ICMP intpred(sge), [[COPY]](s64), [[COPY1]]
11 ; CHECK-NEXT: $w0 = COPY [[ICMP]](s32)
12 ; CHECK-NEXT: [[TRUNC:%[0-9]+]]:_(s32) = G_TRUNC [[COPY]](s64)
13 ; CHECK-NEXT: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 255
14 ; CHECK-NEXT: [[AND:%[0-9]+]]:_(s32) = G_AND [[TRUNC]], [[C]]
15 ; CHECK-NEXT: [[TRUNC1:%[0-9]+]]:_(s32) = G_TRUNC [[COPY1]](s64)
16 ; CHECK-NEXT: [[AND1:%[0-9]+]]:_(s32) = G_AND [[TRUNC1]], [[C]]
17 ; CHECK-NEXT: [[ICMP1:%[0-9]+]]:_(s32) = G_ICMP intpred(ult), [[AND]](s32), [[AND1]]
18 ; CHECK-NEXT: $w0 = COPY [[ICMP1]](s32)
19 ; CHECK-NEXT: [[INTTOPTR:%[0-9]+]]:_(p0) = G_INTTOPTR [[COPY]](s64)
20 ; CHECK-NEXT: [[ICMP2:%[0-9]+]]:_(s32) = G_ICMP intpred(eq), [[INTTOPTR]](p0), [[INTTOPTR]]
21 ; CHECK-NEXT: $w0 = COPY [[ICMP2]](s32)
24 %2:_(s8) = G_TRUNC %0(s64)
25 %3:_(s8) = G_TRUNC %1(s64)
26 %4:_(s1) = G_ICMP intpred(sge), %0(s64), %1
27 %11:_(s32) = G_ANYEXT %4(s1)
29 %8:_(s1) = G_ICMP intpred(ult), %2(s8), %3
30 %12:_(s32) = G_ANYEXT %8(s1)
32 %9:_(p0) = G_INTTOPTR %0(s64)
33 %10:_(s1) = G_ICMP intpred(eq), %9(p0), %9
34 %14:_(s32) = G_ANYEXT %10(s1)
41 tracksRegLiveness: true
43 ; CHECK-LABEL: name: test_s128
45 ; CHECK-NEXT: successors: %bb.1(0x40000000), %bb.2(0x40000000)
47 ; CHECK-NEXT: [[DEF:%[0-9]+]]:_(s64) = G_IMPLICIT_DEF
48 ; CHECK-NEXT: [[C:%[0-9]+]]:_(s64) = G_CONSTANT i64 0
49 ; CHECK-NEXT: [[C1:%[0-9]+]]:_(s64) = G_CONSTANT i64 4294967296
50 ; CHECK-NEXT: [[ICMP:%[0-9]+]]:_(s32) = G_ICMP intpred(ult), [[DEF]](s64), [[C1]]
51 ; CHECK-NEXT: [[ICMP1:%[0-9]+]]:_(s32) = G_ICMP intpred(eq), [[DEF]](s64), [[C1]]
52 ; CHECK-NEXT: [[ICMP2:%[0-9]+]]:_(s32) = G_ICMP intpred(ult), [[DEF]](s64), [[C]]
53 ; CHECK-NEXT: [[SELECT:%[0-9]+]]:_(s32) = G_SELECT [[ICMP1]](s32), [[ICMP2]], [[ICMP]]
54 ; CHECK-NEXT: G_BRCOND [[SELECT]](s32), %bb.1
55 ; CHECK-NEXT: G_BR %bb.2
58 ; CHECK-NEXT: successors:
60 ; CHECK-NEXT: RET_ReallyLR
62 %0:_(s128) = G_IMPLICIT_DEF
63 %1:_(s128) = G_CONSTANT i128 79228162514264337593543950336
64 %3:_(s1) = G_CONSTANT i1 true
65 %2:_(s1) = G_ICMP intpred(ult), %0(s128), %1
66 G_BRCOND %2(s1), %bb.2
79 tracksRegLiveness: true
81 ; CHECK-LABEL: name: test_s128_eq
83 ; CHECK-NEXT: successors: %bb.1(0x40000000), %bb.2(0x40000000)
85 ; CHECK-NEXT: [[DEF:%[0-9]+]]:_(s64) = G_IMPLICIT_DEF
86 ; CHECK-NEXT: [[C:%[0-9]+]]:_(s64) = G_CONSTANT i64 0
87 ; CHECK-NEXT: [[XOR:%[0-9]+]]:_(s64) = G_XOR [[DEF]], [[DEF]]
88 ; CHECK-NEXT: [[XOR1:%[0-9]+]]:_(s64) = G_XOR [[DEF]], [[DEF]]
89 ; CHECK-NEXT: [[OR:%[0-9]+]]:_(s64) = G_OR [[XOR]], [[XOR1]]
90 ; CHECK-NEXT: [[ICMP:%[0-9]+]]:_(s32) = G_ICMP intpred(eq), [[OR]](s64), [[C]]
91 ; CHECK-NEXT: G_BRCOND [[ICMP]](s32), %bb.1
92 ; CHECK-NEXT: G_BR %bb.2
95 ; CHECK-NEXT: successors:
97 ; CHECK-NEXT: RET_ReallyLR
99 %lhs:_(s128) = G_IMPLICIT_DEF
100 %rhs:_(s128) = G_IMPLICIT_DEF
101 %cmp:_(s1) = G_ICMP intpred(eq), %lhs(s128), %rhs
102 G_BRCOND %cmp(s1), %bb.2
112 tracksRegLiveness: true
114 ; CHECK-LABEL: name: test_s88_eq
116 ; CHECK-NEXT: successors: %bb.1(0x40000000), %bb.2(0x40000000)
118 ; CHECK-NEXT: [[DEF:%[0-9]+]]:_(s64) = G_IMPLICIT_DEF
119 ; CHECK-NEXT: [[C:%[0-9]+]]:_(s64) = G_CONSTANT i64 -1
120 ; CHECK-NEXT: [[C1:%[0-9]+]]:_(s64) = G_CONSTANT i64 16777215
121 ; CHECK-NEXT: [[AND:%[0-9]+]]:_(s64) = G_AND [[DEF]], [[C]]
122 ; CHECK-NEXT: [[AND1:%[0-9]+]]:_(s64) = G_AND [[DEF]], [[C1]]
123 ; CHECK-NEXT: [[AND2:%[0-9]+]]:_(s64) = G_AND [[DEF]], [[C]]
124 ; CHECK-NEXT: [[AND3:%[0-9]+]]:_(s64) = G_AND [[DEF]], [[C1]]
125 ; CHECK-NEXT: [[C2:%[0-9]+]]:_(s64) = G_CONSTANT i64 0
126 ; CHECK-NEXT: [[XOR:%[0-9]+]]:_(s64) = G_XOR [[AND]], [[AND2]]
127 ; CHECK-NEXT: [[XOR1:%[0-9]+]]:_(s64) = G_XOR [[AND1]], [[AND3]]
128 ; CHECK-NEXT: [[OR:%[0-9]+]]:_(s64) = G_OR [[XOR]], [[XOR1]]
129 ; CHECK-NEXT: [[ICMP:%[0-9]+]]:_(s32) = G_ICMP intpred(eq), [[OR]](s64), [[C2]]
130 ; CHECK-NEXT: G_BRCOND [[ICMP]](s32), %bb.1
131 ; CHECK-NEXT: G_BR %bb.2
134 ; CHECK-NEXT: successors:
136 ; CHECK-NEXT: RET_ReallyLR
138 %lhs:_(s88) = G_IMPLICIT_DEF
139 %rhs:_(s88) = G_IMPLICIT_DEF
140 %cmp:_(s1) = G_ICMP intpred(eq), %lhs(s88), %rhs
141 G_BRCOND %cmp(s1), %bb.2
151 tracksRegLiveness: true
153 ; CHECK-LABEL: name: test_s88_ne
155 ; CHECK-NEXT: successors: %bb.1(0x40000000), %bb.2(0x40000000)
157 ; CHECK-NEXT: [[DEF:%[0-9]+]]:_(s64) = G_IMPLICIT_DEF
158 ; CHECK-NEXT: [[C:%[0-9]+]]:_(s64) = G_CONSTANT i64 -1
159 ; CHECK-NEXT: [[C1:%[0-9]+]]:_(s64) = G_CONSTANT i64 16777215
160 ; CHECK-NEXT: [[AND:%[0-9]+]]:_(s64) = G_AND [[DEF]], [[C]]
161 ; CHECK-NEXT: [[AND1:%[0-9]+]]:_(s64) = G_AND [[DEF]], [[C1]]
162 ; CHECK-NEXT: [[AND2:%[0-9]+]]:_(s64) = G_AND [[DEF]], [[C]]
163 ; CHECK-NEXT: [[AND3:%[0-9]+]]:_(s64) = G_AND [[DEF]], [[C1]]
164 ; CHECK-NEXT: [[C2:%[0-9]+]]:_(s64) = G_CONSTANT i64 0
165 ; CHECK-NEXT: [[XOR:%[0-9]+]]:_(s64) = G_XOR [[AND]], [[AND2]]
166 ; CHECK-NEXT: [[XOR1:%[0-9]+]]:_(s64) = G_XOR [[AND1]], [[AND3]]
167 ; CHECK-NEXT: [[OR:%[0-9]+]]:_(s64) = G_OR [[XOR]], [[XOR1]]
168 ; CHECK-NEXT: [[ICMP:%[0-9]+]]:_(s32) = G_ICMP intpred(ne), [[OR]](s64), [[C2]]
169 ; CHECK-NEXT: G_BRCOND [[ICMP]](s32), %bb.1
170 ; CHECK-NEXT: G_BR %bb.2
173 ; CHECK-NEXT: successors:
175 ; CHECK-NEXT: RET_ReallyLR
177 %lhs:_(s88) = G_IMPLICIT_DEF
178 %rhs:_(s88) = G_IMPLICIT_DEF
179 %cmp:_(s1) = G_ICMP intpred(ne), %lhs(s88), %rhs
180 G_BRCOND %cmp(s1), %bb.2
190 tracksRegLiveness: true
192 ; CHECK-LABEL: name: test_s96_eq
194 ; CHECK-NEXT: successors: %bb.1(0x40000000), %bb.2(0x40000000)
196 ; CHECK-NEXT: [[DEF:%[0-9]+]]:_(s64) = G_IMPLICIT_DEF
197 ; CHECK-NEXT: [[C:%[0-9]+]]:_(s64) = G_CONSTANT i64 -1
198 ; CHECK-NEXT: [[C1:%[0-9]+]]:_(s64) = G_CONSTANT i64 4294967295
199 ; CHECK-NEXT: [[AND:%[0-9]+]]:_(s64) = G_AND [[DEF]], [[C]]
200 ; CHECK-NEXT: [[AND1:%[0-9]+]]:_(s64) = G_AND [[DEF]], [[C1]]
201 ; CHECK-NEXT: [[AND2:%[0-9]+]]:_(s64) = G_AND [[DEF]], [[C]]
202 ; CHECK-NEXT: [[AND3:%[0-9]+]]:_(s64) = G_AND [[DEF]], [[C1]]
203 ; CHECK-NEXT: [[C2:%[0-9]+]]:_(s64) = G_CONSTANT i64 0
204 ; CHECK-NEXT: [[XOR:%[0-9]+]]:_(s64) = G_XOR [[AND]], [[AND2]]
205 ; CHECK-NEXT: [[XOR1:%[0-9]+]]:_(s64) = G_XOR [[AND1]], [[AND3]]
206 ; CHECK-NEXT: [[OR:%[0-9]+]]:_(s64) = G_OR [[XOR]], [[XOR1]]
207 ; CHECK-NEXT: [[ICMP:%[0-9]+]]:_(s32) = G_ICMP intpred(eq), [[OR]](s64), [[C2]]
208 ; CHECK-NEXT: G_BRCOND [[ICMP]](s32), %bb.1
209 ; CHECK-NEXT: G_BR %bb.2
212 ; CHECK-NEXT: successors:
214 ; CHECK-NEXT: RET_ReallyLR
216 %lhs:_(s96) = G_IMPLICIT_DEF
217 %rhs:_(s96) = G_IMPLICIT_DEF
218 %cmp:_(s1) = G_ICMP intpred(eq), %lhs(s96), %rhs
219 G_BRCOND %cmp(s1), %bb.2
228 tracksRegLiveness: true
230 ; CHECK-LABEL: name: test_s318_eq
232 ; CHECK-NEXT: successors: %bb.1(0x40000000), %bb.2(0x40000000)
234 ; CHECK-NEXT: [[DEF:%[0-9]+]]:_(s64) = G_IMPLICIT_DEF
235 ; CHECK-NEXT: [[C:%[0-9]+]]:_(s64) = G_CONSTANT i64 -1
236 ; CHECK-NEXT: [[C1:%[0-9]+]]:_(s64) = G_CONSTANT i64 4611686018427387903
237 ; CHECK-NEXT: [[C2:%[0-9]+]]:_(s64) = G_CONSTANT i64 0
238 ; CHECK-NEXT: [[AND:%[0-9]+]]:_(s64) = G_AND [[DEF]], [[C]]
239 ; CHECK-NEXT: [[AND1:%[0-9]+]]:_(s64) = G_AND [[DEF]], [[C]]
240 ; CHECK-NEXT: [[AND2:%[0-9]+]]:_(s64) = G_AND [[DEF]], [[C]]
241 ; CHECK-NEXT: [[AND3:%[0-9]+]]:_(s64) = G_AND [[DEF]], [[C]]
242 ; CHECK-NEXT: [[AND4:%[0-9]+]]:_(s64) = G_AND [[DEF]], [[C1]]
243 ; CHECK-NEXT: [[AND5:%[0-9]+]]:_(s64) = G_AND [[DEF]], [[C2]]
244 ; CHECK-NEXT: [[AND6:%[0-9]+]]:_(s64) = G_AND [[DEF]], [[C2]]
245 ; CHECK-NEXT: [[AND7:%[0-9]+]]:_(s64) = G_AND [[DEF]], [[C2]]
246 ; CHECK-NEXT: [[AND8:%[0-9]+]]:_(s64) = G_AND [[DEF]], [[C]]
247 ; CHECK-NEXT: [[AND9:%[0-9]+]]:_(s64) = G_AND [[DEF]], [[C]]
248 ; CHECK-NEXT: [[AND10:%[0-9]+]]:_(s64) = G_AND [[DEF]], [[C]]
249 ; CHECK-NEXT: [[AND11:%[0-9]+]]:_(s64) = G_AND [[DEF]], [[C]]
250 ; CHECK-NEXT: [[AND12:%[0-9]+]]:_(s64) = G_AND [[DEF]], [[C1]]
251 ; CHECK-NEXT: [[AND13:%[0-9]+]]:_(s64) = G_AND [[DEF]], [[C2]]
252 ; CHECK-NEXT: [[AND14:%[0-9]+]]:_(s64) = G_AND [[DEF]], [[C2]]
253 ; CHECK-NEXT: [[AND15:%[0-9]+]]:_(s64) = G_AND [[DEF]], [[C2]]
254 ; CHECK-NEXT: [[XOR:%[0-9]+]]:_(s64) = G_XOR [[AND]], [[AND8]]
255 ; CHECK-NEXT: [[XOR1:%[0-9]+]]:_(s64) = G_XOR [[AND1]], [[AND9]]
256 ; CHECK-NEXT: [[XOR2:%[0-9]+]]:_(s64) = G_XOR [[AND2]], [[AND10]]
257 ; CHECK-NEXT: [[XOR3:%[0-9]+]]:_(s64) = G_XOR [[AND3]], [[AND11]]
258 ; CHECK-NEXT: [[XOR4:%[0-9]+]]:_(s64) = G_XOR [[AND4]], [[AND12]]
259 ; CHECK-NEXT: [[XOR5:%[0-9]+]]:_(s64) = G_XOR [[AND5]], [[AND13]]
260 ; CHECK-NEXT: [[XOR6:%[0-9]+]]:_(s64) = G_XOR [[AND6]], [[AND14]]
261 ; CHECK-NEXT: [[XOR7:%[0-9]+]]:_(s64) = G_XOR [[AND7]], [[AND15]]
262 ; CHECK-NEXT: [[OR:%[0-9]+]]:_(s64) = G_OR [[XOR]], [[XOR1]]
263 ; CHECK-NEXT: [[OR1:%[0-9]+]]:_(s64) = G_OR [[OR]], [[XOR2]]
264 ; CHECK-NEXT: [[OR2:%[0-9]+]]:_(s64) = G_OR [[OR1]], [[XOR3]]
265 ; CHECK-NEXT: [[OR3:%[0-9]+]]:_(s64) = G_OR [[OR2]], [[XOR4]]
266 ; CHECK-NEXT: [[OR4:%[0-9]+]]:_(s64) = G_OR [[OR3]], [[XOR5]]
267 ; CHECK-NEXT: [[OR5:%[0-9]+]]:_(s64) = G_OR [[OR4]], [[XOR6]]
268 ; CHECK-NEXT: [[OR6:%[0-9]+]]:_(s64) = G_OR [[OR5]], [[XOR7]]
269 ; CHECK-NEXT: [[ICMP:%[0-9]+]]:_(s32) = G_ICMP intpred(eq), [[OR6]](s64), [[C2]]
270 ; CHECK-NEXT: G_BRCOND [[ICMP]](s32), %bb.1
271 ; CHECK-NEXT: G_BR %bb.2
274 ; CHECK-NEXT: successors:
276 ; CHECK-NEXT: RET_ReallyLR
278 %lhs:_(s318) = G_IMPLICIT_DEF
279 %rhs:_(s318) = G_IMPLICIT_DEF
280 %cmp:_(s1) = G_ICMP intpred(eq), %lhs(s318), %rhs
281 G_BRCOND %cmp(s1), %bb.2
290 tracksRegLiveness: true
292 ; CHECK-LABEL: name: test_s158_eq
294 ; CHECK-NEXT: successors: %bb.1(0x40000000), %bb.2(0x40000000)
296 ; CHECK-NEXT: [[DEF:%[0-9]+]]:_(s64) = G_IMPLICIT_DEF
297 ; CHECK-NEXT: [[C:%[0-9]+]]:_(s64) = G_CONSTANT i64 -1
298 ; CHECK-NEXT: [[C1:%[0-9]+]]:_(s64) = G_CONSTANT i64 1073741823
299 ; CHECK-NEXT: [[C2:%[0-9]+]]:_(s64) = G_CONSTANT i64 0
300 ; CHECK-NEXT: [[AND:%[0-9]+]]:_(s64) = G_AND [[DEF]], [[C]]
301 ; CHECK-NEXT: [[AND1:%[0-9]+]]:_(s64) = G_AND [[DEF]], [[C]]
302 ; CHECK-NEXT: [[AND2:%[0-9]+]]:_(s64) = G_AND [[DEF]], [[C1]]
303 ; CHECK-NEXT: [[AND3:%[0-9]+]]:_(s64) = G_AND [[DEF]], [[C2]]
304 ; CHECK-NEXT: [[AND4:%[0-9]+]]:_(s64) = G_AND [[DEF]], [[C]]
305 ; CHECK-NEXT: [[AND5:%[0-9]+]]:_(s64) = G_AND [[DEF]], [[C]]
306 ; CHECK-NEXT: [[AND6:%[0-9]+]]:_(s64) = G_AND [[DEF]], [[C1]]
307 ; CHECK-NEXT: [[AND7:%[0-9]+]]:_(s64) = G_AND [[DEF]], [[C2]]
308 ; CHECK-NEXT: [[XOR:%[0-9]+]]:_(s64) = G_XOR [[AND]], [[AND4]]
309 ; CHECK-NEXT: [[XOR1:%[0-9]+]]:_(s64) = G_XOR [[AND1]], [[AND5]]
310 ; CHECK-NEXT: [[XOR2:%[0-9]+]]:_(s64) = G_XOR [[AND2]], [[AND6]]
311 ; CHECK-NEXT: [[XOR3:%[0-9]+]]:_(s64) = G_XOR [[AND3]], [[AND7]]
312 ; CHECK-NEXT: [[OR:%[0-9]+]]:_(s64) = G_OR [[XOR]], [[XOR1]]
313 ; CHECK-NEXT: [[OR1:%[0-9]+]]:_(s64) = G_OR [[OR]], [[XOR2]]
314 ; CHECK-NEXT: [[OR2:%[0-9]+]]:_(s64) = G_OR [[OR1]], [[XOR3]]
315 ; CHECK-NEXT: [[ICMP:%[0-9]+]]:_(s32) = G_ICMP intpred(eq), [[OR2]](s64), [[C2]]
316 ; CHECK-NEXT: G_BRCOND [[ICMP]](s32), %bb.1
317 ; CHECK-NEXT: G_BR %bb.2
320 ; CHECK-NEXT: successors:
322 ; CHECK-NEXT: RET_ReallyLR
324 %lhs:_(s158) = G_IMPLICIT_DEF
325 %rhs:_(s158) = G_IMPLICIT_DEF
326 %cmp:_(s1) = G_ICMP intpred(eq), %lhs(s158), %rhs
327 G_BRCOND %cmp(s1), %bb.2
335 name: test_3xs32_eq_pr_78181
336 tracksRegLiveness: true
340 ; CHECK-LABEL: name: test_3xs32_eq_pr_78181
341 ; CHECK: liveins: $x0
343 ; CHECK-NEXT: %const:_(s32) = G_IMPLICIT_DEF
344 ; CHECK-NEXT: [[BUILD_VECTOR:%[0-9]+]]:_(<4 x s32>) = G_BUILD_VECTOR %const(s32), %const(s32), %const(s32), %const(s32)
345 ; CHECK-NEXT: [[BUILD_VECTOR1:%[0-9]+]]:_(<4 x s32>) = G_BUILD_VECTOR %const(s32), %const(s32), %const(s32), %const(s32)
346 ; CHECK-NEXT: [[ICMP:%[0-9]+]]:_(<4 x s32>) = G_ICMP intpred(eq), [[BUILD_VECTOR]](<4 x s32>), [[BUILD_VECTOR1]]
347 ; CHECK-NEXT: [[C:%[0-9]+]]:_(s64) = G_CONSTANT i64 1
348 ; CHECK-NEXT: [[EVEC:%[0-9]+]]:_(s32) = G_EXTRACT_VECTOR_ELT [[ICMP]](<4 x s32>), [[C]](s64)
349 ; CHECK-NEXT: $w0 = COPY [[EVEC]](s32)
350 ; CHECK-NEXT: RET_ReallyLR
351 %const:_(s32) = G_IMPLICIT_DEF
352 %rhs:_(<3 x s32>) = G_BUILD_VECTOR %const(s32), %const(s32), %const(s32)
353 %lhs:_(<3 x s32>) = G_BUILD_VECTOR %const(s32), %const(s32), %const(s32)
354 %cmp:_(<3 x s32>) = G_ICMP intpred(eq), %lhs(<3 x s32>), %rhs
355 %1:_(s64) = G_CONSTANT i64 1
356 %2:_(s32) = G_EXTRACT_VECTOR_ELT %cmp(<3 x s32>), %1(s64)
361 name: test_3xs16_eq_pr_78181
362 tracksRegLiveness: true
366 ; CHECK-LABEL: name: test_3xs16_eq_pr_78181
367 ; CHECK: liveins: $x0
369 ; CHECK-NEXT: %const:_(s16) = G_IMPLICIT_DEF
370 ; CHECK-NEXT: [[BUILD_VECTOR:%[0-9]+]]:_(<4 x s16>) = G_BUILD_VECTOR %const(s16), %const(s16), %const(s16), %const(s16)
371 ; CHECK-NEXT: [[BUILD_VECTOR1:%[0-9]+]]:_(<4 x s16>) = G_BUILD_VECTOR %const(s16), %const(s16), %const(s16), %const(s16)
372 ; CHECK-NEXT: [[ICMP:%[0-9]+]]:_(<4 x s16>) = G_ICMP intpred(eq), [[BUILD_VECTOR]](<4 x s16>), [[BUILD_VECTOR1]]
373 ; CHECK-NEXT: [[UV:%[0-9]+]]:_(s16), [[UV1:%[0-9]+]]:_(s16), [[UV2:%[0-9]+]]:_(s16), [[UV3:%[0-9]+]]:_(s16) = G_UNMERGE_VALUES [[ICMP]](<4 x s16>)
374 ; CHECK-NEXT: [[C:%[0-9]+]]:_(s64) = G_CONSTANT i64 1
375 ; CHECK-NEXT: [[ANYEXT:%[0-9]+]]:_(s32) = G_ANYEXT [[UV]](s16)
376 ; CHECK-NEXT: [[ANYEXT1:%[0-9]+]]:_(s32) = G_ANYEXT [[UV1]](s16)
377 ; CHECK-NEXT: [[ANYEXT2:%[0-9]+]]:_(s32) = G_ANYEXT [[UV2]](s16)
378 ; CHECK-NEXT: [[DEF:%[0-9]+]]:_(s32) = G_IMPLICIT_DEF
379 ; CHECK-NEXT: [[BUILD_VECTOR2:%[0-9]+]]:_(<4 x s32>) = G_BUILD_VECTOR [[ANYEXT]](s32), [[ANYEXT1]](s32), [[ANYEXT2]](s32), [[DEF]](s32)
380 ; CHECK-NEXT: [[EVEC:%[0-9]+]]:_(s32) = G_EXTRACT_VECTOR_ELT [[BUILD_VECTOR2]](<4 x s32>), [[C]](s64)
381 ; CHECK-NEXT: [[C1:%[0-9]+]]:_(s32) = G_CONSTANT i32 65535
382 ; CHECK-NEXT: %zext:_(s32) = G_AND [[EVEC]], [[C1]]
383 ; CHECK-NEXT: $w0 = COPY %zext(s32)
384 ; CHECK-NEXT: RET_ReallyLR
385 %const:_(s16) = G_IMPLICIT_DEF
386 %rhs:_(<3 x s16>) = G_BUILD_VECTOR %const(s16), %const(s16), %const(s16)
387 %lhs:_(<3 x s16>) = G_BUILD_VECTOR %const(s16), %const(s16), %const(s16)
388 %cmp:_(<3 x s16>) = G_ICMP intpred(eq), %lhs(<3 x s16>), %rhs
389 %1:_(s64) = G_CONSTANT i64 1
390 %2:_(s16) = G_EXTRACT_VECTOR_ELT %cmp(<3 x s16>), %1(s64)
391 %zext:_(s32) = G_ZEXT %2(s16)
392 $w0 = COPY %zext(s32)
396 name: test_3xs8_eq_pr_78181
397 tracksRegLiveness: true
401 ; CHECK-LABEL: name: test_3xs8_eq_pr_78181
402 ; CHECK: liveins: $x0
404 ; CHECK-NEXT: %const:_(s8) = G_IMPLICIT_DEF
405 ; CHECK-NEXT: [[BUILD_VECTOR:%[0-9]+]]:_(<8 x s8>) = G_BUILD_VECTOR %const(s8), %const(s8), %const(s8), %const(s8), %const(s8), %const(s8), %const(s8), %const(s8)
406 ; CHECK-NEXT: [[BUILD_VECTOR1:%[0-9]+]]:_(<8 x s8>) = G_BUILD_VECTOR %const(s8), %const(s8), %const(s8), %const(s8), %const(s8), %const(s8), %const(s8), %const(s8)
407 ; CHECK-NEXT: [[ICMP:%[0-9]+]]:_(<8 x s8>) = G_ICMP intpred(eq), [[BUILD_VECTOR]](<8 x s8>), [[BUILD_VECTOR1]]
408 ; CHECK-NEXT: [[UV:%[0-9]+]]:_(<4 x s8>), [[UV1:%[0-9]+]]:_(<4 x s8>) = G_UNMERGE_VALUES [[ICMP]](<8 x s8>)
409 ; CHECK-NEXT: [[UV2:%[0-9]+]]:_(s8), [[UV3:%[0-9]+]]:_(s8), [[UV4:%[0-9]+]]:_(s8), [[UV5:%[0-9]+]]:_(s8) = G_UNMERGE_VALUES [[UV]](<4 x s8>)
410 ; CHECK-NEXT: [[C:%[0-9]+]]:_(s64) = G_CONSTANT i64 1
411 ; CHECK-NEXT: [[ANYEXT:%[0-9]+]]:_(s32) = G_ANYEXT [[UV2]](s8)
412 ; CHECK-NEXT: [[ANYEXT1:%[0-9]+]]:_(s32) = G_ANYEXT [[UV3]](s8)
413 ; CHECK-NEXT: [[ANYEXT2:%[0-9]+]]:_(s32) = G_ANYEXT [[UV4]](s8)
414 ; CHECK-NEXT: [[DEF:%[0-9]+]]:_(s32) = G_IMPLICIT_DEF
415 ; CHECK-NEXT: [[BUILD_VECTOR2:%[0-9]+]]:_(<4 x s32>) = G_BUILD_VECTOR [[ANYEXT]](s32), [[ANYEXT1]](s32), [[ANYEXT2]](s32), [[DEF]](s32)
416 ; CHECK-NEXT: [[EVEC:%[0-9]+]]:_(s32) = G_EXTRACT_VECTOR_ELT [[BUILD_VECTOR2]](<4 x s32>), [[C]](s64)
417 ; CHECK-NEXT: [[C1:%[0-9]+]]:_(s32) = G_CONSTANT i32 255
418 ; CHECK-NEXT: %zext:_(s32) = G_AND [[EVEC]], [[C1]]
419 ; CHECK-NEXT: $w0 = COPY %zext(s32)
420 ; CHECK-NEXT: RET_ReallyLR
421 %const:_(s8) = G_IMPLICIT_DEF
422 %rhs:_(<3 x s8>) = G_BUILD_VECTOR %const(s8), %const(s8), %const(s8)
423 %lhs:_(<3 x s8>) = G_BUILD_VECTOR %const(s8), %const(s8), %const(s8)
424 %cmp:_(<3 x s8>) = G_ICMP intpred(eq), %lhs(<3 x s8>), %rhs
425 %1:_(s64) = G_CONSTANT i64 1
426 %2:_(s8) = G_EXTRACT_VECTOR_ELT %cmp(<3 x s8>), %1(s64)
427 %zext:_(s32) = G_ZEXT %2(s8)
428 $w0 = COPY %zext(s32)
432 name: test_3xs64_eq_clamp
433 tracksRegLiveness: true
437 ; CHECK-LABEL: name: test_3xs64_eq_clamp
438 ; CHECK: liveins: $x0
440 ; CHECK-NEXT: %const:_(s64) = G_IMPLICIT_DEF
441 ; CHECK-NEXT: [[BUILD_VECTOR:%[0-9]+]]:_(<2 x s64>) = G_BUILD_VECTOR %const(s64), %const(s64)
442 ; CHECK-NEXT: [[BUILD_VECTOR1:%[0-9]+]]:_(<2 x s64>) = G_BUILD_VECTOR %const(s64), %const(s64)
443 ; CHECK-NEXT: [[ICMP:%[0-9]+]]:_(<2 x s64>) = G_ICMP intpred(eq), [[BUILD_VECTOR]](<2 x s64>), [[BUILD_VECTOR1]]
444 ; CHECK-NEXT: [[C:%[0-9]+]]:_(s64) = G_CONSTANT i64 1
445 ; CHECK-NEXT: [[EVEC:%[0-9]+]]:_(s64) = G_EXTRACT_VECTOR_ELT [[ICMP]](<2 x s64>), [[C]](s64)
446 ; CHECK-NEXT: $x0 = COPY [[EVEC]](s64)
447 ; CHECK-NEXT: RET_ReallyLR
448 %const:_(s64) = G_IMPLICIT_DEF
449 %rhs:_(<3 x s64>) = G_BUILD_VECTOR %const(s64), %const(s64), %const(s64)
450 %lhs:_(<3 x s64>) = G_BUILD_VECTOR %const(s64), %const(s64), %const(s64)
451 %cmp:_(<3 x s64>) = G_ICMP intpred(eq), %lhs(<3 x s64>), %rhs
452 %1:_(s64) = G_CONSTANT i64 1
453 %2:_(s64) = G_EXTRACT_VECTOR_ELT %cmp(<3 x s64>), %1(s64)
458 name: test_5xs32_eq_clamp
459 tracksRegLiveness: true
463 ; CHECK-LABEL: name: test_5xs32_eq_clamp
464 ; CHECK: liveins: $x0
466 ; CHECK-NEXT: %const:_(s32) = G_IMPLICIT_DEF
467 ; CHECK-NEXT: [[BUILD_VECTOR:%[0-9]+]]:_(<4 x s32>) = G_BUILD_VECTOR %const(s32), %const(s32), %const(s32), %const(s32)
468 ; CHECK-NEXT: [[BUILD_VECTOR1:%[0-9]+]]:_(<4 x s32>) = G_BUILD_VECTOR %const(s32), %const(s32), %const(s32), %const(s32)
469 ; CHECK-NEXT: [[ICMP:%[0-9]+]]:_(<4 x s32>) = G_ICMP intpred(eq), [[BUILD_VECTOR]](<4 x s32>), [[BUILD_VECTOR1]]
470 ; CHECK-NEXT: [[C:%[0-9]+]]:_(s64) = G_CONSTANT i64 1
471 ; CHECK-NEXT: [[EVEC:%[0-9]+]]:_(s32) = G_EXTRACT_VECTOR_ELT [[ICMP]](<4 x s32>), [[C]](s64)
472 ; CHECK-NEXT: $w0 = COPY [[EVEC]](s32)
473 ; CHECK-NEXT: RET_ReallyLR
474 %const:_(s32) = G_IMPLICIT_DEF
475 %rhs:_(<5 x s32>) = G_BUILD_VECTOR %const(s32), %const(s32), %const(s32), %const(s32), %const(s32)
476 %lhs:_(<5 x s32>) = G_BUILD_VECTOR %const(s32), %const(s32), %const(s32), %const(s32), %const(s32)
477 %cmp:_(<5 x s32>) = G_ICMP intpred(eq), %lhs(<5 x s32>), %rhs
478 %1:_(s64) = G_CONSTANT i64 1
479 %2:_(s32) = G_EXTRACT_VECTOR_ELT %cmp(<5 x s32>), %1(s64)
484 name: test_7xs16_eq_clamp
485 tracksRegLiveness: true
489 ; CHECK-LABEL: name: test_7xs16_eq_clamp
490 ; CHECK: liveins: $x0
492 ; CHECK-NEXT: %const:_(s16) = G_IMPLICIT_DEF
493 ; CHECK-NEXT: [[BUILD_VECTOR:%[0-9]+]]:_(<8 x s16>) = G_BUILD_VECTOR %const(s16), %const(s16), %const(s16), %const(s16), %const(s16), %const(s16), %const(s16), %const(s16)
494 ; CHECK-NEXT: [[BUILD_VECTOR1:%[0-9]+]]:_(<8 x s16>) = G_BUILD_VECTOR %const(s16), %const(s16), %const(s16), %const(s16), %const(s16), %const(s16), %const(s16), %const(s16)
495 ; CHECK-NEXT: [[ICMP:%[0-9]+]]:_(<8 x s16>) = G_ICMP intpred(eq), [[BUILD_VECTOR]](<8 x s16>), [[BUILD_VECTOR1]]
496 ; CHECK-NEXT: [[C:%[0-9]+]]:_(s64) = G_CONSTANT i64 1
497 ; CHECK-NEXT: [[EVEC:%[0-9]+]]:_(s16) = G_EXTRACT_VECTOR_ELT [[ICMP]](<8 x s16>), [[C]](s64)
498 ; CHECK-NEXT: %zext:_(s32) = G_ZEXT [[EVEC]](s16)
499 ; CHECK-NEXT: $w0 = COPY %zext(s32)
500 ; CHECK-NEXT: RET_ReallyLR
501 %const:_(s16) = G_IMPLICIT_DEF
502 %rhs:_(<7 x s16>) = G_BUILD_VECTOR %const(s16), %const(s16), %const(s16), %const(s16), %const(s16), %const(s16), %const(s16)
503 %lhs:_(<7 x s16>) = G_BUILD_VECTOR %const(s16), %const(s16), %const(s16), %const(s16), %const(s16), %const(s16), %const(s16)
504 %cmp:_(<7 x s16>) = G_ICMP intpred(eq), %lhs(<7 x s16>), %rhs
505 %1:_(s64) = G_CONSTANT i64 1
506 %2:_(s16) = G_EXTRACT_VECTOR_ELT %cmp(<7 x s16>), %1(s64)
507 %zext:_(s32) = G_ZEXT %2(s16)
508 $w0 = COPY %zext(s32)
512 name: test_9xs8_eq_clamp
513 tracksRegLiveness: true
517 ; CHECK-LABEL: name: test_9xs8_eq_clamp
518 ; CHECK: liveins: $x0
520 ; CHECK-NEXT: %const:_(s8) = G_IMPLICIT_DEF
521 ; CHECK-NEXT: [[BUILD_VECTOR:%[0-9]+]]:_(<16 x s8>) = G_BUILD_VECTOR %const(s8), %const(s8), %const(s8), %const(s8), %const(s8), %const(s8), %const(s8), %const(s8), %const(s8), %const(s8), %const(s8), %const(s8), %const(s8), %const(s8), %const(s8), %const(s8)
522 ; CHECK-NEXT: [[BUILD_VECTOR1:%[0-9]+]]:_(<16 x s8>) = G_BUILD_VECTOR %const(s8), %const(s8), %const(s8), %const(s8), %const(s8), %const(s8), %const(s8), %const(s8), %const(s8), %const(s8), %const(s8), %const(s8), %const(s8), %const(s8), %const(s8), %const(s8)
523 ; CHECK-NEXT: [[ICMP:%[0-9]+]]:_(<16 x s8>) = G_ICMP intpred(eq), [[BUILD_VECTOR]](<16 x s8>), [[BUILD_VECTOR1]]
524 ; CHECK-NEXT: [[C:%[0-9]+]]:_(s64) = G_CONSTANT i64 1
525 ; CHECK-NEXT: [[EVEC:%[0-9]+]]:_(s8) = G_EXTRACT_VECTOR_ELT [[ICMP]](<16 x s8>), [[C]](s64)
526 ; CHECK-NEXT: %zext:_(s32) = G_ZEXT [[EVEC]](s8)
527 ; CHECK-NEXT: $w0 = COPY %zext(s32)
528 ; CHECK-NEXT: RET_ReallyLR
529 %const:_(s8) = G_IMPLICIT_DEF
530 %rhs:_(<9 x s8>) = G_BUILD_VECTOR %const(s8), %const(s8), %const(s8), %const(s8), %const(s8), %const(s8), %const(s8), %const(s8), %const(s8)
531 %lhs:_(<9 x s8>) = G_BUILD_VECTOR %const(s8), %const(s8), %const(s8), %const(s8), %const(s8), %const(s8), %const(s8), %const(s8), %const(s8)
532 %cmp:_(<9 x s8>) = G_ICMP intpred(eq), %lhs(<9 x s8>), %rhs
533 %1:_(s64) = G_CONSTANT i64 1
534 %2:_(s8) = G_EXTRACT_VECTOR_ELT %cmp(<9 x s8>), %1(s64)
535 %zext:_(s32) = G_ZEXT %2(s8)
536 $w0 = COPY %zext(s32)