1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2 ; RUN: llc -ppc-gpr-icmps=all -mtriple=powerpc64-unknown-linux-gnu \
3 ; RUN: -verify-machineinstrs -mcpu=pwr7 < %s | FileCheck %s
4 ; RUN: llc -ppc-gpr-icmps=all -mtriple=powerpc64-unknown-linux-gnu \
5 ; RUN: -verify-machineinstrs -mcpu=pwr7 -ppc-gen-isel=false < %s | \
6 ; RUN: FileCheck --check-prefix=CHECK-NO-ISEL %s
7 ; RUN: llc -verify-machineinstrs -mtriple=powerpc64-unknown-linux-gnu -O2 \
8 ; RUN: -ppc-asm-full-reg-names -mcpu=pwr10 -ppc-gpr-icmps=none < %s | \
9 ; RUN: FileCheck %s --check-prefix=CHECK-P10
10 ; RUN: llc -verify-machineinstrs -mtriple=powerpc64le-unknown-linux-gnu -O2 \
11 ; RUN: -ppc-asm-full-reg-names -mcpu=pwr10 -ppc-gpr-icmps=none < %s | \
12 ; RUN: FileCheck %s --check-prefix=CHECK-P10
14 ; Function Attrs: nounwind readnone
15 define zeroext i1 @test1(float %v1, float %v2) #0 {
17 ; CHECK: # %bb.0: # %entry
18 ; CHECK-NEXT: xxlxor 0, 0, 0
19 ; CHECK-NEXT: fcmpu 0, 1, 2
21 ; CHECK-NEXT: fcmpu 5, 2, 2
22 ; CHECK-NEXT: fcmpu 1, 2, 0
23 ; CHECK-NEXT: crnor 20, 3, 0
24 ; CHECK-NEXT: crnor 21, 23, 5
25 ; CHECK-NEXT: crnand 20, 20, 21
26 ; CHECK-NEXT: isel 3, 0, 3, 20
29 ; CHECK-NO-ISEL-LABEL: test1:
30 ; CHECK-NO-ISEL: # %bb.0: # %entry
31 ; CHECK-NO-ISEL-NEXT: xxlxor 0, 0, 0
32 ; CHECK-NO-ISEL-NEXT: fcmpu 0, 1, 2
33 ; CHECK-NO-ISEL-NEXT: li 3, 1
34 ; CHECK-NO-ISEL-NEXT: fcmpu 5, 2, 2
35 ; CHECK-NO-ISEL-NEXT: fcmpu 1, 2, 0
36 ; CHECK-NO-ISEL-NEXT: crnor 20, 3, 0
37 ; CHECK-NO-ISEL-NEXT: crnor 21, 23, 5
38 ; CHECK-NO-ISEL-NEXT: crnand 20, 20, 21
39 ; CHECK-NO-ISEL-NEXT: bc 12, 20, .LBB0_1
40 ; CHECK-NO-ISEL-NEXT: blr
41 ; CHECK-NO-ISEL-NEXT: .LBB0_1: # %entry
42 ; CHECK-NO-ISEL-NEXT: li 3, 0
43 ; CHECK-NO-ISEL-NEXT: blr
45 ; CHECK-P10-LABEL: test1:
46 ; CHECK-P10: # %bb.0: # %entry
47 ; CHECK-P10-NEXT: fcmpu cr0, f1, f2
48 ; CHECK-P10-NEXT: xxlxor f0, f0, f0
49 ; CHECK-P10-NEXT: fcmpu cr1, f2, f2
50 ; CHECK-P10-NEXT: crnor 4*cr5+lt, un, lt
51 ; CHECK-P10-NEXT: fcmpu cr0, f2, f0
52 ; CHECK-P10-NEXT: crnor 4*cr5+gt, 4*cr1+un, gt
53 ; CHECK-P10-NEXT: crand 4*cr5+lt, 4*cr5+lt, 4*cr5+gt
54 ; CHECK-P10-NEXT: setbc r3, 4*cr5+lt
57 %cmp = fcmp oge float %v1, %v2
58 %cmp2 = fcmp ole float %v2, 0.000000e+00
59 %and5 = and i1 %cmp, %cmp2
65 ; Function Attrs: nounwind readnone
66 define zeroext i1 @test2(float %v1, float %v2) #0 {
68 ; CHECK: # %bb.0: # %entry
69 ; CHECK-NEXT: xxlxor 0, 0, 0
70 ; CHECK-NEXT: fcmpu 0, 1, 2
72 ; CHECK-NEXT: fcmpu 5, 2, 2
73 ; CHECK-NEXT: fcmpu 1, 2, 0
74 ; CHECK-NEXT: crnor 20, 3, 0
75 ; CHECK-NEXT: crnor 21, 23, 5
76 ; CHECK-NEXT: creqv 20, 20, 21
77 ; CHECK-NEXT: isel 3, 0, 3, 20
80 ; CHECK-NO-ISEL-LABEL: test2:
81 ; CHECK-NO-ISEL: # %bb.0: # %entry
82 ; CHECK-NO-ISEL-NEXT: xxlxor 0, 0, 0
83 ; CHECK-NO-ISEL-NEXT: fcmpu 0, 1, 2
84 ; CHECK-NO-ISEL-NEXT: li 3, 1
85 ; CHECK-NO-ISEL-NEXT: fcmpu 5, 2, 2
86 ; CHECK-NO-ISEL-NEXT: fcmpu 1, 2, 0
87 ; CHECK-NO-ISEL-NEXT: crnor 20, 3, 0
88 ; CHECK-NO-ISEL-NEXT: crnor 21, 23, 5
89 ; CHECK-NO-ISEL-NEXT: creqv 20, 20, 21
90 ; CHECK-NO-ISEL-NEXT: bc 12, 20, .LBB1_1
91 ; CHECK-NO-ISEL-NEXT: blr
92 ; CHECK-NO-ISEL-NEXT: .LBB1_1: # %entry
93 ; CHECK-NO-ISEL-NEXT: li 3, 0
94 ; CHECK-NO-ISEL-NEXT: blr
96 ; CHECK-P10-LABEL: test2:
97 ; CHECK-P10: # %bb.0: # %entry
98 ; CHECK-P10-NEXT: fcmpu cr0, f1, f2
99 ; CHECK-P10-NEXT: xxlxor f0, f0, f0
100 ; CHECK-P10-NEXT: fcmpu cr1, f2, f2
101 ; CHECK-P10-NEXT: crnor 4*cr5+lt, un, lt
102 ; CHECK-P10-NEXT: fcmpu cr0, f2, f0
103 ; CHECK-P10-NEXT: crnor 4*cr5+gt, 4*cr1+un, gt
104 ; CHECK-P10-NEXT: crxor 4*cr5+lt, 4*cr5+lt, 4*cr5+gt
105 ; CHECK-P10-NEXT: setbc r3, 4*cr5+lt
106 ; CHECK-P10-NEXT: blr
108 %cmp = fcmp oge float %v1, %v2
109 %cmp2 = fcmp ole float %v2, 0.000000e+00
110 %xor5 = xor i1 %cmp, %cmp2
116 ; Function Attrs: nounwind readnone
117 define zeroext i1 @test3(float %v1, float %v2, i32 signext %x) #0 {
118 ; CHECK-LABEL: test3:
119 ; CHECK: # %bb.0: # %entry
120 ; CHECK-NEXT: xxlxor 0, 0, 0
121 ; CHECK-NEXT: fcmpu 0, 2, 2
122 ; CHECK-NEXT: li 3, 1
123 ; CHECK-NEXT: fcmpu 5, 1, 2
124 ; CHECK-NEXT: fcmpu 1, 2, 0
125 ; CHECK-NEXT: crnor 20, 23, 20
126 ; CHECK-NEXT: crnor 21, 3, 5
127 ; CHECK-NEXT: cmpwi 5, -2
128 ; CHECK-NEXT: crandc 21, 21, 2
129 ; CHECK-NEXT: creqv 20, 20, 21
130 ; CHECK-NEXT: isel 3, 0, 3, 20
133 ; CHECK-NO-ISEL-LABEL: test3:
134 ; CHECK-NO-ISEL: # %bb.0: # %entry
135 ; CHECK-NO-ISEL-NEXT: xxlxor 0, 0, 0
136 ; CHECK-NO-ISEL-NEXT: fcmpu 0, 2, 2
137 ; CHECK-NO-ISEL-NEXT: li 3, 1
138 ; CHECK-NO-ISEL-NEXT: fcmpu 5, 1, 2
139 ; CHECK-NO-ISEL-NEXT: fcmpu 1, 2, 0
140 ; CHECK-NO-ISEL-NEXT: crnor 20, 23, 20
141 ; CHECK-NO-ISEL-NEXT: crnor 21, 3, 5
142 ; CHECK-NO-ISEL-NEXT: cmpwi 5, -2
143 ; CHECK-NO-ISEL-NEXT: crandc 21, 21, 2
144 ; CHECK-NO-ISEL-NEXT: creqv 20, 20, 21
145 ; CHECK-NO-ISEL-NEXT: bc 12, 20, .LBB2_1
146 ; CHECK-NO-ISEL-NEXT: blr
147 ; CHECK-NO-ISEL-NEXT: .LBB2_1: # %entry
148 ; CHECK-NO-ISEL-NEXT: li 3, 0
149 ; CHECK-NO-ISEL-NEXT: blr
151 ; CHECK-P10-LABEL: test3:
152 ; CHECK-P10: # %bb.0: # %entry
153 ; CHECK-P10-NEXT: fcmpu cr0, f1, f2
154 ; CHECK-P10-NEXT: xxlxor f0, f0, f0
155 ; CHECK-P10-NEXT: fcmpu cr1, f2, f2
156 ; CHECK-P10-NEXT: crnor 4*cr5+lt, un, lt
157 ; CHECK-P10-NEXT: fcmpu cr0, f2, f0
158 ; CHECK-P10-NEXT: crnor 4*cr5+gt, 4*cr1+un, gt
159 ; CHECK-P10-NEXT: cmpwi r5, -2
160 ; CHECK-P10-NEXT: crandc 4*cr5+gt, 4*cr5+gt, eq
161 ; CHECK-P10-NEXT: crxor 4*cr5+lt, 4*cr5+lt, 4*cr5+gt
162 ; CHECK-P10-NEXT: setbc r3, 4*cr5+lt
163 ; CHECK-P10-NEXT: blr
165 %cmp = fcmp oge float %v1, %v2
166 %cmp2 = fcmp ole float %v2, 0.000000e+00
167 %cmp4 = icmp ne i32 %x, -2
168 %and7 = and i1 %cmp2, %cmp4
169 %xor8 = xor i1 %cmp, %and7
175 ; Function Attrs: nounwind readnone
176 define zeroext i1 @test4(i1 zeroext %v1, i1 zeroext %v2, i1 zeroext %v3) #0 {
177 ; CHECK-LABEL: test4:
178 ; CHECK: # %bb.0: # %entry
179 ; CHECK-NEXT: and 3, 3, 4
180 ; CHECK-NEXT: or 3, 3, 5
183 ; CHECK-NO-ISEL-LABEL: test4:
184 ; CHECK-NO-ISEL: # %bb.0: # %entry
185 ; CHECK-NO-ISEL-NEXT: and 3, 3, 4
186 ; CHECK-NO-ISEL-NEXT: or 3, 3, 5
187 ; CHECK-NO-ISEL-NEXT: blr
189 ; CHECK-P10-LABEL: test4:
190 ; CHECK-P10: # %bb.0: # %entry
191 ; CHECK-P10-NEXT: and r3, r3, r4
192 ; CHECK-P10-NEXT: or r3, r3, r5
193 ; CHECK-P10-NEXT: blr
195 %and8 = and i1 %v1, %v2
196 %or9 = or i1 %and8, %v3
201 ; Function Attrs: nounwind readnone
202 define zeroext i1 @test5(i1 zeroext %v1, i1 zeroext %v2, i32 signext %v3) #0 {
203 ; CHECK-LABEL: test5:
204 ; CHECK: # %bb.0: # %entry
205 ; CHECK-NEXT: li 6, -2
206 ; CHECK-NEXT: and 3, 3, 4
207 ; CHECK-NEXT: xor 5, 5, 6
208 ; CHECK-NEXT: clrldi 3, 3, 63
209 ; CHECK-NEXT: cntlzw 5, 5
210 ; CHECK-NEXT: srwi 4, 5, 5
211 ; CHECK-NEXT: xori 4, 4, 1
212 ; CHECK-NEXT: or 3, 3, 4
215 ; CHECK-NO-ISEL-LABEL: test5:
216 ; CHECK-NO-ISEL: # %bb.0: # %entry
217 ; CHECK-NO-ISEL-NEXT: li 6, -2
218 ; CHECK-NO-ISEL-NEXT: and 3, 3, 4
219 ; CHECK-NO-ISEL-NEXT: xor 5, 5, 6
220 ; CHECK-NO-ISEL-NEXT: clrldi 3, 3, 63
221 ; CHECK-NO-ISEL-NEXT: cntlzw 5, 5
222 ; CHECK-NO-ISEL-NEXT: srwi 4, 5, 5
223 ; CHECK-NO-ISEL-NEXT: xori 4, 4, 1
224 ; CHECK-NO-ISEL-NEXT: or 3, 3, 4
225 ; CHECK-NO-ISEL-NEXT: blr
227 ; CHECK-P10-LABEL: test5:
228 ; CHECK-P10: # %bb.0: # %entry
229 ; CHECK-P10-NEXT: and r3, r3, r4
230 ; CHECK-P10-NEXT: cmpwi cr1, r5, -2
231 ; CHECK-P10-NEXT: andi. r3, r3, 1
232 ; CHECK-P10-NEXT: crorc 4*cr5+lt, gt, 4*cr1+eq
233 ; CHECK-P10-NEXT: setbc r3, 4*cr5+lt
234 ; CHECK-P10-NEXT: blr
236 %and6 = and i1 %v1, %v2
237 %cmp = icmp ne i32 %v3, -2
238 %or7 = or i1 %and6, %cmp
244 ; Function Attrs: nounwind readnone
245 define zeroext i1 @test6(i1 zeroext %v1, i1 zeroext %v2, i32 signext %v3) #0 {
246 ; CHECK-LABEL: test6:
247 ; CHECK: # %bb.0: # %entry
248 ; CHECK-NEXT: li 6, -2
249 ; CHECK-NEXT: clrldi 4, 4, 63
250 ; CHECK-NEXT: xor 5, 5, 6
251 ; CHECK-NEXT: clrldi 3, 3, 63
252 ; CHECK-NEXT: cntlzw 5, 5
253 ; CHECK-NEXT: srwi 5, 5, 5
254 ; CHECK-NEXT: xori 5, 5, 1
255 ; CHECK-NEXT: or 4, 5, 4
256 ; CHECK-NEXT: and 3, 4, 3
259 ; CHECK-NO-ISEL-LABEL: test6:
260 ; CHECK-NO-ISEL: # %bb.0: # %entry
261 ; CHECK-NO-ISEL-NEXT: li 6, -2
262 ; CHECK-NO-ISEL-NEXT: clrldi 4, 4, 63
263 ; CHECK-NO-ISEL-NEXT: xor 5, 5, 6
264 ; CHECK-NO-ISEL-NEXT: clrldi 3, 3, 63
265 ; CHECK-NO-ISEL-NEXT: cntlzw 5, 5
266 ; CHECK-NO-ISEL-NEXT: srwi 5, 5, 5
267 ; CHECK-NO-ISEL-NEXT: xori 5, 5, 1
268 ; CHECK-NO-ISEL-NEXT: or 4, 5, 4
269 ; CHECK-NO-ISEL-NEXT: and 3, 4, 3
270 ; CHECK-NO-ISEL-NEXT: blr
272 ; CHECK-P10-LABEL: test6:
273 ; CHECK-P10: # %bb.0: # %entry
274 ; CHECK-P10-NEXT: andi. r3, r3, 1
275 ; CHECK-P10-NEXT: cmpwi cr1, r5, -2
276 ; CHECK-P10-NEXT: crmove 4*cr5+lt, gt
277 ; CHECK-P10-NEXT: andi. r3, r4, 1
278 ; CHECK-P10-NEXT: crorc 4*cr5+gt, gt, 4*cr1+eq
279 ; CHECK-P10-NEXT: crand 4*cr5+lt, 4*cr5+gt, 4*cr5+lt
280 ; CHECK-P10-NEXT: setbc r3, 4*cr5+lt
281 ; CHECK-P10-NEXT: blr
283 %cmp = icmp ne i32 %v3, -2
284 %or6 = or i1 %cmp, %v2
285 %and7 = and i1 %or6, %v1
291 ; Function Attrs: nounwind readnone
292 define signext i32 @test7(i1 zeroext %v2, i32 signext %i1, i32 signext %i2) #0 {
293 ; CHECK-LABEL: test7:
294 ; CHECK: # %bb.0: # %entry
295 ; CHECK-NEXT: andi. 3, 3, 1
296 ; CHECK-NEXT: iselgt 3, 4, 5
299 ; CHECK-NO-ISEL-LABEL: test7:
300 ; CHECK-NO-ISEL: # %bb.0: # %entry
301 ; CHECK-NO-ISEL-NEXT: andi. 3, 3, 1
302 ; CHECK-NO-ISEL-NEXT: bc 12, 1, .LBB6_2
303 ; CHECK-NO-ISEL-NEXT: # %bb.1: # %entry
304 ; CHECK-NO-ISEL-NEXT: ori 3, 5, 0
305 ; CHECK-NO-ISEL-NEXT: blr
306 ; CHECK-NO-ISEL-NEXT: .LBB6_2: # %entry
307 ; CHECK-NO-ISEL-NEXT: addi 3, 4, 0
308 ; CHECK-NO-ISEL-NEXT: blr
310 ; CHECK-P10-LABEL: test7:
311 ; CHECK-P10: # %bb.0: # %entry
312 ; CHECK-P10-NEXT: andi. r3, r3, 1
313 ; CHECK-P10-NEXT: iselgt r3, r4, r5
314 ; CHECK-P10-NEXT: blr
316 %cond = select i1 %v2, i32 %i1, i32 %i2
321 define signext i32 @exttest7(i32 signext %a) #0 {
322 ; CHECK-LABEL: exttest7:
323 ; CHECK: # %bb.0: # %entry
324 ; CHECK-NEXT: li 4, 8
325 ; CHECK-NEXT: cmplwi 3, 5
326 ; CHECK-NEXT: li 3, 7
327 ; CHECK-NEXT: iseleq 3, 3, 4
330 ; CHECK-NO-ISEL-LABEL: exttest7:
331 ; CHECK-NO-ISEL: # %bb.0: # %entry
332 ; CHECK-NO-ISEL-NEXT: li 4, 8
333 ; CHECK-NO-ISEL-NEXT: cmplwi 3, 5
334 ; CHECK-NO-ISEL-NEXT: li 3, 7
335 ; CHECK-NO-ISEL-NEXT: bclr 12, 2, 0
336 ; CHECK-NO-ISEL-NEXT: # %bb.1: # %entry
337 ; CHECK-NO-ISEL-NEXT: ori 3, 4, 0
338 ; CHECK-NO-ISEL-NEXT: blr
340 ; CHECK-P10-LABEL: exttest7:
341 ; CHECK-P10: # %bb.0: # %entry
342 ; CHECK-P10-NEXT: cmplwi r3, 5
343 ; CHECK-P10-NEXT: li r3, 8
344 ; CHECK-P10-NEXT: li r4, 7
345 ; CHECK-P10-NEXT: iseleq r3, r4, r3
346 ; CHECK-P10-NEXT: blr
348 %cmp = icmp eq i32 %a, 5
349 %cond = select i1 %cmp, i32 7, i32 8
354 define zeroext i32 @exttest8() #0 {
355 ; CHECK-LABEL: exttest8:
356 ; CHECK: # %bb.0: # %entry
357 ; CHECK-NEXT: ld 3, 0(3)
358 ; CHECK-NEXT: subfic 3, 3, 80
359 ; CHECK-NEXT: rldicl 3, 3, 63, 1
360 ; CHECK-NEXT: cmplwi 3, 80
361 ; CHECK-NEXT: iselgt 3, 0, 3
362 ; CHECK-NEXT: clrldi 3, 3, 32
365 ; CHECK-NO-ISEL-LABEL: exttest8:
366 ; CHECK-NO-ISEL: # %bb.0: # %entry
367 ; CHECK-NO-ISEL-NEXT: ld 3, 0(3)
368 ; CHECK-NO-ISEL-NEXT: subfic 3, 3, 80
369 ; CHECK-NO-ISEL-NEXT: rldicl 3, 3, 63, 1
370 ; CHECK-NO-ISEL-NEXT: cmplwi 3, 80
371 ; CHECK-NO-ISEL-NEXT: bc 12, 1, .LBB8_1
372 ; CHECK-NO-ISEL-NEXT: b .LBB8_2
373 ; CHECK-NO-ISEL-NEXT: .LBB8_1: # %entry
374 ; CHECK-NO-ISEL-NEXT: li 3, 0
375 ; CHECK-NO-ISEL-NEXT: .LBB8_2: # %entry
376 ; CHECK-NO-ISEL-NEXT: clrldi 3, 3, 32
377 ; CHECK-NO-ISEL-NEXT: blr
379 ; CHECK-P10-LABEL: exttest8:
380 ; CHECK-P10: # %bb.0: # %entry
381 ; CHECK-P10-NEXT: ld r3, 0(r3)
382 ; CHECK-P10-NEXT: subfic r3, r3, 80
383 ; CHECK-P10-NEXT: rldicl r3, r3, 63, 1
384 ; CHECK-P10-NEXT: cmplwi r3, 80
385 ; CHECK-P10-NEXT: iselgt r3, 0, r3
386 ; CHECK-P10-NEXT: clrldi r3, r3, 32
387 ; CHECK-P10-NEXT: blr
389 %v0 = load i64, ptr undef, align 8
390 %sub = sub i64 80, %v0
391 %div = lshr i64 %sub, 1
392 %conv13 = trunc i64 %div to i32
393 %cmp14 = icmp ugt i32 %conv13, 80
394 %.conv13 = select i1 %cmp14, i32 0, i32 %conv13
396 ; This is a don't-crash test: %conv13 is both one of the possible select output
397 ; values and also an input to the conditional feeding it.
400 ; Function Attrs: nounwind readnone
401 define float @test8(i1 zeroext %v2, float %v1, float %v3) #0 {
402 ; CHECK-LABEL: test8:
403 ; CHECK: # %bb.0: # %entry
404 ; CHECK-NEXT: andi. 3, 3, 1
405 ; CHECK-NEXT: bclr 12, 1, 0
406 ; CHECK-NEXT: # %bb.1: # %entry
407 ; CHECK-NEXT: fmr 1, 2
410 ; CHECK-NO-ISEL-LABEL: test8:
411 ; CHECK-NO-ISEL: # %bb.0: # %entry
412 ; CHECK-NO-ISEL-NEXT: andi. 3, 3, 1
413 ; CHECK-NO-ISEL-NEXT: bclr 12, 1, 0
414 ; CHECK-NO-ISEL-NEXT: # %bb.1: # %entry
415 ; CHECK-NO-ISEL-NEXT: fmr 1, 2
416 ; CHECK-NO-ISEL-NEXT: blr
418 ; CHECK-P10-LABEL: test8:
419 ; CHECK-P10: # %bb.0: # %entry
420 ; CHECK-P10-NEXT: andi. r3, r3, 1
421 ; CHECK-P10-NEXT: bclr 12, gt, 0
422 ; CHECK-P10-NEXT: # %bb.1: # %entry
423 ; CHECK-P10-NEXT: fmr f1, f2
424 ; CHECK-P10-NEXT: blr
426 %cond = select i1 %v2, float %v1, float %v3
431 ; Function Attrs: nounwind readnone
432 define signext i32 @test10(i32 signext %v1, i32 signext %v2) #0 {
433 ; CHECK-LABEL: test10:
434 ; CHECK: # %bb.0: # %entry
435 ; CHECK-NEXT: cntlzw 3, 3
436 ; CHECK-NEXT: cntlzw 4, 4
437 ; CHECK-NEXT: srwi 3, 3, 5
438 ; CHECK-NEXT: srwi 4, 4, 5
439 ; CHECK-NEXT: xori 3, 3, 1
440 ; CHECK-NEXT: and 3, 3, 4
443 ; CHECK-NO-ISEL-LABEL: test10:
444 ; CHECK-NO-ISEL: # %bb.0: # %entry
445 ; CHECK-NO-ISEL-NEXT: cntlzw 3, 3
446 ; CHECK-NO-ISEL-NEXT: cntlzw 4, 4
447 ; CHECK-NO-ISEL-NEXT: srwi 3, 3, 5
448 ; CHECK-NO-ISEL-NEXT: srwi 4, 4, 5
449 ; CHECK-NO-ISEL-NEXT: xori 3, 3, 1
450 ; CHECK-NO-ISEL-NEXT: and 3, 3, 4
451 ; CHECK-NO-ISEL-NEXT: blr
453 ; CHECK-P10-LABEL: test10:
454 ; CHECK-P10: # %bb.0: # %entry
455 ; CHECK-P10-NEXT: cmpwi r3, 0
456 ; CHECK-P10-NEXT: cmpwi cr1, r4, 0
457 ; CHECK-P10-NEXT: crandc 4*cr5+lt, 4*cr1+eq, eq
458 ; CHECK-P10-NEXT: setbc r3, 4*cr5+lt
459 ; CHECK-P10-NEXT: blr
461 %tobool = icmp ne i32 %v1, 0
462 %lnot = icmp eq i32 %v2, 0
463 %and3 = and i1 %tobool, %lnot
464 %and = zext i1 %and3 to i32
470 attributes #0 = { nounwind readnone }