1 ; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
2 ; RUN: opt < %s -instsimplify -S | FileCheck %s
4 ; There are 10 * 10 combinations of icmp predicates that can be OR'd together.
5 ; The majority of these can be simplified to always true or just one of the icmps.
7 define i1 @eq_eq(i8 %a, i8 %b) {
9 ; CHECK-NEXT: [[CMP2:%.*]] = icmp eq i8 %a, %b
10 ; CHECK-NEXT: ret i1 [[CMP2]]
12 %cmp1 = icmp eq i8 %a, %b
13 %cmp2 = icmp eq i8 %a, %b
14 %or = or i1 %cmp1, %cmp2
18 define i1 @eq_ne(i8 %a, i8 %b) {
19 ; CHECK-LABEL: @eq_ne(
20 ; CHECK-NEXT: ret i1 true
22 %cmp1 = icmp eq i8 %a, %b
23 %cmp2 = icmp ne i8 %a, %b
24 %or = or i1 %cmp1, %cmp2
28 define i1 @eq_sge(i8 %a, i8 %b) {
29 ; CHECK-LABEL: @eq_sge(
30 ; CHECK-NEXT: [[CMP2:%.*]] = icmp sge i8 %a, %b
31 ; CHECK-NEXT: ret i1 [[CMP2]]
33 %cmp1 = icmp eq i8 %a, %b
34 %cmp2 = icmp sge i8 %a, %b
35 %or = or i1 %cmp1, %cmp2
39 define i1 @eq_sgt(i8 %a, i8 %b) {
40 ; CHECK-LABEL: @eq_sgt(
41 ; CHECK-NEXT: [[CMP1:%.*]] = icmp eq i8 %a, %b
42 ; CHECK-NEXT: [[CMP2:%.*]] = icmp sgt i8 %a, %b
43 ; CHECK-NEXT: [[OR:%.*]] = or i1 [[CMP1]], [[CMP2]]
44 ; CHECK-NEXT: ret i1 [[OR]]
46 %cmp1 = icmp eq i8 %a, %b
47 %cmp2 = icmp sgt i8 %a, %b
48 %or = or i1 %cmp1, %cmp2
52 define i1 @eq_sle(i8 %a, i8 %b) {
53 ; CHECK-LABEL: @eq_sle(
54 ; CHECK-NEXT: [[CMP2:%.*]] = icmp sle i8 %a, %b
55 ; CHECK-NEXT: ret i1 [[CMP2]]
57 %cmp1 = icmp eq i8 %a, %b
58 %cmp2 = icmp sle i8 %a, %b
59 %or = or i1 %cmp1, %cmp2
63 define i1 @eq_slt(i8 %a, i8 %b) {
64 ; CHECK-LABEL: @eq_slt(
65 ; CHECK-NEXT: [[CMP1:%.*]] = icmp eq i8 %a, %b
66 ; CHECK-NEXT: [[CMP2:%.*]] = icmp slt i8 %a, %b
67 ; CHECK-NEXT: [[OR:%.*]] = or i1 [[CMP1]], [[CMP2]]
68 ; CHECK-NEXT: ret i1 [[OR]]
70 %cmp1 = icmp eq i8 %a, %b
71 %cmp2 = icmp slt i8 %a, %b
72 %or = or i1 %cmp1, %cmp2
76 define i1 @eq_uge(i8 %a, i8 %b) {
77 ; CHECK-LABEL: @eq_uge(
78 ; CHECK-NEXT: [[CMP2:%.*]] = icmp uge i8 %a, %b
79 ; CHECK-NEXT: ret i1 [[CMP2]]
81 %cmp1 = icmp eq i8 %a, %b
82 %cmp2 = icmp uge i8 %a, %b
83 %or = or i1 %cmp1, %cmp2
87 define i1 @eq_ugt(i8 %a, i8 %b) {
88 ; CHECK-LABEL: @eq_ugt(
89 ; CHECK-NEXT: [[CMP1:%.*]] = icmp eq i8 %a, %b
90 ; CHECK-NEXT: [[CMP2:%.*]] = icmp ugt i8 %a, %b
91 ; CHECK-NEXT: [[OR:%.*]] = or i1 [[CMP1]], [[CMP2]]
92 ; CHECK-NEXT: ret i1 [[OR]]
94 %cmp1 = icmp eq i8 %a, %b
95 %cmp2 = icmp ugt i8 %a, %b
96 %or = or i1 %cmp1, %cmp2
100 define i1 @eq_ule(i8 %a, i8 %b) {
101 ; CHECK-LABEL: @eq_ule(
102 ; CHECK-NEXT: [[CMP2:%.*]] = icmp ule i8 %a, %b
103 ; CHECK-NEXT: ret i1 [[CMP2]]
105 %cmp1 = icmp eq i8 %a, %b
106 %cmp2 = icmp ule i8 %a, %b
107 %or = or i1 %cmp1, %cmp2
111 define i1 @eq_ult(i8 %a, i8 %b) {
112 ; CHECK-LABEL: @eq_ult(
113 ; CHECK-NEXT: [[CMP1:%.*]] = icmp eq i8 %a, %b
114 ; CHECK-NEXT: [[CMP2:%.*]] = icmp ult i8 %a, %b
115 ; CHECK-NEXT: [[OR:%.*]] = or i1 [[CMP1]], [[CMP2]]
116 ; CHECK-NEXT: ret i1 [[OR]]
118 %cmp1 = icmp eq i8 %a, %b
119 %cmp2 = icmp ult i8 %a, %b
120 %or = or i1 %cmp1, %cmp2
126 define i1 @ne_eq(i8 %a, i8 %b) {
127 ; CHECK-LABEL: @ne_eq(
128 ; CHECK-NEXT: ret i1 true
130 %cmp1 = icmp ne i8 %a, %b
131 %cmp2 = icmp eq i8 %a, %b
132 %or = or i1 %cmp1, %cmp2
136 define i1 @ne_ne(i8 %a, i8 %b) {
137 ; CHECK-LABEL: @ne_ne(
138 ; CHECK-NEXT: [[CMP2:%.*]] = icmp ne i8 %a, %b
139 ; CHECK-NEXT: ret i1 [[CMP2]]
141 %cmp1 = icmp ne i8 %a, %b
142 %cmp2 = icmp ne i8 %a, %b
143 %or = or i1 %cmp1, %cmp2
147 define i1 @ne_sge(i8 %a, i8 %b) {
148 ; CHECK-LABEL: @ne_sge(
149 ; CHECK-NEXT: ret i1 true
151 %cmp1 = icmp ne i8 %a, %b
152 %cmp2 = icmp sge i8 %a, %b
153 %or = or i1 %cmp1, %cmp2
157 define i1 @ne_sgt(i8 %a, i8 %b) {
158 ; CHECK-LABEL: @ne_sgt(
159 ; CHECK-NEXT: [[CMP1:%.*]] = icmp ne i8 %a, %b
160 ; CHECK-NEXT: ret i1 [[CMP1]]
162 %cmp1 = icmp ne i8 %a, %b
163 %cmp2 = icmp sgt i8 %a, %b
164 %or = or i1 %cmp1, %cmp2
168 define i1 @ne_sle(i8 %a, i8 %b) {
169 ; CHECK-LABEL: @ne_sle(
170 ; CHECK-NEXT: ret i1 true
172 %cmp1 = icmp ne i8 %a, %b
173 %cmp2 = icmp sle i8 %a, %b
174 %or = or i1 %cmp1, %cmp2
178 define i1 @ne_slt(i8 %a, i8 %b) {
179 ; CHECK-LABEL: @ne_slt(
180 ; CHECK-NEXT: [[CMP1:%.*]] = icmp ne i8 %a, %b
181 ; CHECK-NEXT: ret i1 [[CMP1]]
183 %cmp1 = icmp ne i8 %a, %b
184 %cmp2 = icmp slt i8 %a, %b
185 %or = or i1 %cmp1, %cmp2
189 define i1 @ne_uge(i8 %a, i8 %b) {
190 ; CHECK-LABEL: @ne_uge(
191 ; CHECK-NEXT: ret i1 true
193 %cmp1 = icmp ne i8 %a, %b
194 %cmp2 = icmp uge i8 %a, %b
195 %or = or i1 %cmp1, %cmp2
199 define i1 @ne_ugt(i8 %a, i8 %b) {
200 ; CHECK-LABEL: @ne_ugt(
201 ; CHECK-NEXT: [[CMP1:%.*]] = icmp ne i8 %a, %b
202 ; CHECK-NEXT: ret i1 [[CMP1]]
204 %cmp1 = icmp ne i8 %a, %b
205 %cmp2 = icmp ugt i8 %a, %b
206 %or = or i1 %cmp1, %cmp2
210 define i1 @ne_ule(i8 %a, i8 %b) {
211 ; CHECK-LABEL: @ne_ule(
212 ; CHECK-NEXT: ret i1 true
214 %cmp1 = icmp ne i8 %a, %b
215 %cmp2 = icmp ule i8 %a, %b
216 %or = or i1 %cmp1, %cmp2
220 define i1 @ne_ult(i8 %a, i8 %b) {
221 ; CHECK-LABEL: @ne_ult(
222 ; CHECK-NEXT: [[CMP1:%.*]] = icmp ne i8 %a, %b
223 ; CHECK-NEXT: ret i1 [[CMP1]]
225 %cmp1 = icmp ne i8 %a, %b
226 %cmp2 = icmp ult i8 %a, %b
227 %or = or i1 %cmp1, %cmp2
233 define i1 @sge_eq(i8 %a, i8 %b) {
234 ; CHECK-LABEL: @sge_eq(
235 ; CHECK-NEXT: [[CMP1:%.*]] = icmp sge i8 %a, %b
236 ; CHECK-NEXT: ret i1 [[CMP1]]
238 %cmp1 = icmp sge i8 %a, %b
239 %cmp2 = icmp eq i8 %a, %b
240 %or = or i1 %cmp1, %cmp2
244 define i1 @sge_ne(i8 %a, i8 %b) {
245 ; CHECK-LABEL: @sge_ne(
246 ; CHECK-NEXT: ret i1 true
248 %cmp1 = icmp sge i8 %a, %b
249 %cmp2 = icmp ne i8 %a, %b
250 %or = or i1 %cmp1, %cmp2
254 define i1 @sge_sge(i8 %a, i8 %b) {
255 ; CHECK-LABEL: @sge_sge(
256 ; CHECK-NEXT: [[CMP2:%.*]] = icmp sge i8 %a, %b
257 ; CHECK-NEXT: ret i1 [[CMP2]]
259 %cmp1 = icmp sge i8 %a, %b
260 %cmp2 = icmp sge i8 %a, %b
261 %or = or i1 %cmp1, %cmp2
265 define i1 @sge_sgt(i8 %a, i8 %b) {
266 ; CHECK-LABEL: @sge_sgt(
267 ; CHECK-NEXT: [[CMP1:%.*]] = icmp sge i8 %a, %b
268 ; CHECK-NEXT: ret i1 [[CMP1]]
270 %cmp1 = icmp sge i8 %a, %b
271 %cmp2 = icmp sgt i8 %a, %b
272 %or = or i1 %cmp1, %cmp2
276 define i1 @sge_sle(i8 %a, i8 %b) {
277 ; CHECK-LABEL: @sge_sle(
278 ; CHECK-NEXT: ret i1 true
280 %cmp1 = icmp sge i8 %a, %b
281 %cmp2 = icmp sle i8 %a, %b
282 %or = or i1 %cmp1, %cmp2
286 define i1 @sge_slt(i8 %a, i8 %b) {
287 ; CHECK-LABEL: @sge_slt(
288 ; CHECK-NEXT: ret i1 true
290 %cmp1 = icmp sge i8 %a, %b
291 %cmp2 = icmp slt i8 %a, %b
292 %or = or i1 %cmp1, %cmp2
296 define i1 @sge_uge(i8 %a, i8 %b) {
297 ; CHECK-LABEL: @sge_uge(
298 ; CHECK-NEXT: [[CMP1:%.*]] = icmp sge i8 %a, %b
299 ; CHECK-NEXT: [[CMP2:%.*]] = icmp uge i8 %a, %b
300 ; CHECK-NEXT: [[OR:%.*]] = or i1 [[CMP1]], [[CMP2]]
301 ; CHECK-NEXT: ret i1 [[OR]]
303 %cmp1 = icmp sge i8 %a, %b
304 %cmp2 = icmp uge i8 %a, %b
305 %or = or i1 %cmp1, %cmp2
309 define i1 @sge_ugt(i8 %a, i8 %b) {
310 ; CHECK-LABEL: @sge_ugt(
311 ; CHECK-NEXT: [[CMP1:%.*]] = icmp sge i8 %a, %b
312 ; CHECK-NEXT: [[CMP2:%.*]] = icmp ugt i8 %a, %b
313 ; CHECK-NEXT: [[OR:%.*]] = or i1 [[CMP1]], [[CMP2]]
314 ; CHECK-NEXT: ret i1 [[OR]]
316 %cmp1 = icmp sge i8 %a, %b
317 %cmp2 = icmp ugt i8 %a, %b
318 %or = or i1 %cmp1, %cmp2
322 define i1 @sge_ule(i8 %a, i8 %b) {
323 ; CHECK-LABEL: @sge_ule(
324 ; CHECK-NEXT: [[CMP1:%.*]] = icmp sge i8 %a, %b
325 ; CHECK-NEXT: [[CMP2:%.*]] = icmp ule i8 %a, %b
326 ; CHECK-NEXT: [[OR:%.*]] = or i1 [[CMP1]], [[CMP2]]
327 ; CHECK-NEXT: ret i1 [[OR]]
329 %cmp1 = icmp sge i8 %a, %b
330 %cmp2 = icmp ule i8 %a, %b
331 %or = or i1 %cmp1, %cmp2
335 define i1 @sge_ult(i8 %a, i8 %b) {
336 ; CHECK-LABEL: @sge_ult(
337 ; CHECK-NEXT: [[CMP1:%.*]] = icmp sge i8 %a, %b
338 ; CHECK-NEXT: [[CMP2:%.*]] = icmp ult i8 %a, %b
339 ; CHECK-NEXT: [[OR:%.*]] = or i1 [[CMP1]], [[CMP2]]
340 ; CHECK-NEXT: ret i1 [[OR]]
342 %cmp1 = icmp sge i8 %a, %b
343 %cmp2 = icmp ult i8 %a, %b
344 %or = or i1 %cmp1, %cmp2
350 define i1 @sgt_eq(i8 %a, i8 %b) {
351 ; CHECK-LABEL: @sgt_eq(
352 ; CHECK-NEXT: [[CMP1:%.*]] = icmp sgt i8 %a, %b
353 ; CHECK-NEXT: [[CMP2:%.*]] = icmp eq i8 %a, %b
354 ; CHECK-NEXT: [[OR:%.*]] = or i1 [[CMP1]], [[CMP2]]
355 ; CHECK-NEXT: ret i1 [[OR]]
357 %cmp1 = icmp sgt i8 %a, %b
358 %cmp2 = icmp eq i8 %a, %b
359 %or = or i1 %cmp1, %cmp2
363 define i1 @sgt_ne(i8 %a, i8 %b) {
364 ; CHECK-LABEL: @sgt_ne(
365 ; CHECK-NEXT: [[CMP2:%.*]] = icmp ne i8 %a, %b
366 ; CHECK-NEXT: ret i1 [[CMP2]]
368 %cmp1 = icmp sgt i8 %a, %b
369 %cmp2 = icmp ne i8 %a, %b
370 %or = or i1 %cmp1, %cmp2
374 define i1 @sgt_sge(i8 %a, i8 %b) {
375 ; CHECK-LABEL: @sgt_sge(
376 ; CHECK-NEXT: [[CMP2:%.*]] = icmp sge i8 %a, %b
377 ; CHECK-NEXT: ret i1 [[CMP2]]
379 %cmp1 = icmp sgt i8 %a, %b
380 %cmp2 = icmp sge i8 %a, %b
381 %or = or i1 %cmp1, %cmp2
385 define i1 @sgt_sgt(i8 %a, i8 %b) {
386 ; CHECK-LABEL: @sgt_sgt(
387 ; CHECK-NEXT: [[CMP2:%.*]] = icmp sgt i8 %a, %b
388 ; CHECK-NEXT: ret i1 [[CMP2]]
390 %cmp1 = icmp sgt i8 %a, %b
391 %cmp2 = icmp sgt i8 %a, %b
392 %or = or i1 %cmp1, %cmp2
396 define i1 @sgt_sle(i8 %a, i8 %b) {
397 ; CHECK-LABEL: @sgt_sle(
398 ; CHECK-NEXT: ret i1 true
400 %cmp1 = icmp sgt i8 %a, %b
401 %cmp2 = icmp sle i8 %a, %b
402 %or = or i1 %cmp1, %cmp2
406 define i1 @sgt_slt(i8 %a, i8 %b) {
407 ; CHECK-LABEL: @sgt_slt(
408 ; CHECK-NEXT: [[CMP1:%.*]] = icmp sgt i8 %a, %b
409 ; CHECK-NEXT: [[CMP2:%.*]] = icmp slt i8 %a, %b
410 ; CHECK-NEXT: [[OR:%.*]] = or i1 [[CMP1]], [[CMP2]]
411 ; CHECK-NEXT: ret i1 [[OR]]
413 %cmp1 = icmp sgt i8 %a, %b
414 %cmp2 = icmp slt i8 %a, %b
415 %or = or i1 %cmp1, %cmp2
419 define i1 @sgt_uge(i8 %a, i8 %b) {
420 ; CHECK-LABEL: @sgt_uge(
421 ; CHECK-NEXT: [[CMP1:%.*]] = icmp sgt i8 %a, %b
422 ; CHECK-NEXT: [[CMP2:%.*]] = icmp uge i8 %a, %b
423 ; CHECK-NEXT: [[OR:%.*]] = or i1 [[CMP1]], [[CMP2]]
424 ; CHECK-NEXT: ret i1 [[OR]]
426 %cmp1 = icmp sgt i8 %a, %b
427 %cmp2 = icmp uge i8 %a, %b
428 %or = or i1 %cmp1, %cmp2
432 define i1 @sgt_ugt(i8 %a, i8 %b) {
433 ; CHECK-LABEL: @sgt_ugt(
434 ; CHECK-NEXT: [[CMP1:%.*]] = icmp sgt i8 %a, %b
435 ; CHECK-NEXT: [[CMP2:%.*]] = icmp ugt i8 %a, %b
436 ; CHECK-NEXT: [[OR:%.*]] = or i1 [[CMP1]], [[CMP2]]
437 ; CHECK-NEXT: ret i1 [[OR]]
439 %cmp1 = icmp sgt i8 %a, %b
440 %cmp2 = icmp ugt i8 %a, %b
441 %or = or i1 %cmp1, %cmp2
445 define i1 @sgt_ule(i8 %a, i8 %b) {
446 ; CHECK-LABEL: @sgt_ule(
447 ; CHECK-NEXT: [[CMP1:%.*]] = icmp sgt i8 %a, %b
448 ; CHECK-NEXT: [[CMP2:%.*]] = icmp ule i8 %a, %b
449 ; CHECK-NEXT: [[OR:%.*]] = or i1 [[CMP1]], [[CMP2]]
450 ; CHECK-NEXT: ret i1 [[OR]]
452 %cmp1 = icmp sgt i8 %a, %b
453 %cmp2 = icmp ule i8 %a, %b
454 %or = or i1 %cmp1, %cmp2
458 define i1 @sgt_ult(i8 %a, i8 %b) {
459 ; CHECK-LABEL: @sgt_ult(
460 ; CHECK-NEXT: [[CMP1:%.*]] = icmp sgt i8 %a, %b
461 ; CHECK-NEXT: [[CMP2:%.*]] = icmp ult i8 %a, %b
462 ; CHECK-NEXT: [[OR:%.*]] = or i1 [[CMP1]], [[CMP2]]
463 ; CHECK-NEXT: ret i1 [[OR]]
465 %cmp1 = icmp sgt i8 %a, %b
466 %cmp2 = icmp ult i8 %a, %b
467 %or = or i1 %cmp1, %cmp2
473 define i1 @sle_eq(i8 %a, i8 %b) {
474 ; CHECK-LABEL: @sle_eq(
475 ; CHECK-NEXT: [[CMP1:%.*]] = icmp sle i8 %a, %b
476 ; CHECK-NEXT: ret i1 [[CMP1]]
478 %cmp1 = icmp sle i8 %a, %b
479 %cmp2 = icmp eq i8 %a, %b
480 %or = or i1 %cmp1, %cmp2
484 define i1 @sle_ne(i8 %a, i8 %b) {
485 ; CHECK-LABEL: @sle_ne(
486 ; CHECK-NEXT: ret i1 true
488 %cmp1 = icmp sle i8 %a, %b
489 %cmp2 = icmp ne i8 %a, %b
490 %or = or i1 %cmp1, %cmp2
494 define i1 @sle_sge(i8 %a, i8 %b) {
495 ; CHECK-LABEL: @sle_sge(
496 ; CHECK-NEXT: ret i1 true
498 %cmp1 = icmp sle i8 %a, %b
499 %cmp2 = icmp sge i8 %a, %b
500 %or = or i1 %cmp1, %cmp2
504 define i1 @sle_sgt(i8 %a, i8 %b) {
505 ; CHECK-LABEL: @sle_sgt(
506 ; CHECK-NEXT: ret i1 true
508 %cmp1 = icmp sle i8 %a, %b
509 %cmp2 = icmp sgt i8 %a, %b
510 %or = or i1 %cmp1, %cmp2
514 define i1 @sle_sle(i8 %a, i8 %b) {
515 ; CHECK-LABEL: @sle_sle(
516 ; CHECK-NEXT: [[CMP2:%.*]] = icmp sle i8 %a, %b
517 ; CHECK-NEXT: ret i1 [[CMP2]]
519 %cmp1 = icmp sle i8 %a, %b
520 %cmp2 = icmp sle i8 %a, %b
521 %or = or i1 %cmp1, %cmp2
525 define i1 @sle_slt(i8 %a, i8 %b) {
526 ; CHECK-LABEL: @sle_slt(
527 ; CHECK-NEXT: [[CMP1:%.*]] = icmp sle i8 %a, %b
528 ; CHECK-NEXT: ret i1 [[CMP1]]
530 %cmp1 = icmp sle i8 %a, %b
531 %cmp2 = icmp slt i8 %a, %b
532 %or = or i1 %cmp1, %cmp2
536 define i1 @sle_uge(i8 %a, i8 %b) {
537 ; CHECK-LABEL: @sle_uge(
538 ; CHECK-NEXT: [[CMP1:%.*]] = icmp sle i8 %a, %b
539 ; CHECK-NEXT: [[CMP2:%.*]] = icmp uge i8 %a, %b
540 ; CHECK-NEXT: [[OR:%.*]] = or i1 [[CMP1]], [[CMP2]]
541 ; CHECK-NEXT: ret i1 [[OR]]
543 %cmp1 = icmp sle i8 %a, %b
544 %cmp2 = icmp uge i8 %a, %b
545 %or = or i1 %cmp1, %cmp2
549 define i1 @sle_ugt(i8 %a, i8 %b) {
550 ; CHECK-LABEL: @sle_ugt(
551 ; CHECK-NEXT: [[CMP1:%.*]] = icmp sle i8 %a, %b
552 ; CHECK-NEXT: [[CMP2:%.*]] = icmp ugt i8 %a, %b
553 ; CHECK-NEXT: [[OR:%.*]] = or i1 [[CMP1]], [[CMP2]]
554 ; CHECK-NEXT: ret i1 [[OR]]
556 %cmp1 = icmp sle i8 %a, %b
557 %cmp2 = icmp ugt i8 %a, %b
558 %or = or i1 %cmp1, %cmp2
562 define i1 @sle_ule(i8 %a, i8 %b) {
563 ; CHECK-LABEL: @sle_ule(
564 ; CHECK-NEXT: [[CMP1:%.*]] = icmp sle i8 %a, %b
565 ; CHECK-NEXT: [[CMP2:%.*]] = icmp ule i8 %a, %b
566 ; CHECK-NEXT: [[OR:%.*]] = or i1 [[CMP1]], [[CMP2]]
567 ; CHECK-NEXT: ret i1 [[OR]]
569 %cmp1 = icmp sle i8 %a, %b
570 %cmp2 = icmp ule i8 %a, %b
571 %or = or i1 %cmp1, %cmp2
575 define i1 @sle_ult(i8 %a, i8 %b) {
576 ; CHECK-LABEL: @sle_ult(
577 ; CHECK-NEXT: [[CMP1:%.*]] = icmp sle i8 %a, %b
578 ; CHECK-NEXT: [[CMP2:%.*]] = icmp ult i8 %a, %b
579 ; CHECK-NEXT: [[OR:%.*]] = or i1 [[CMP1]], [[CMP2]]
580 ; CHECK-NEXT: ret i1 [[OR]]
582 %cmp1 = icmp sle i8 %a, %b
583 %cmp2 = icmp ult i8 %a, %b
584 %or = or i1 %cmp1, %cmp2
590 define i1 @slt_eq(i8 %a, i8 %b) {
591 ; CHECK-LABEL: @slt_eq(
592 ; CHECK-NEXT: [[CMP1:%.*]] = icmp slt i8 %a, %b
593 ; CHECK-NEXT: [[CMP2:%.*]] = icmp eq i8 %a, %b
594 ; CHECK-NEXT: [[OR:%.*]] = or i1 [[CMP1]], [[CMP2]]
595 ; CHECK-NEXT: ret i1 [[OR]]
597 %cmp1 = icmp slt i8 %a, %b
598 %cmp2 = icmp eq i8 %a, %b
599 %or = or i1 %cmp1, %cmp2
603 define i1 @slt_ne(i8 %a, i8 %b) {
604 ; CHECK-LABEL: @slt_ne(
605 ; CHECK-NEXT: [[CMP2:%.*]] = icmp ne i8 %a, %b
606 ; CHECK-NEXT: ret i1 [[CMP2]]
608 %cmp1 = icmp slt i8 %a, %b
609 %cmp2 = icmp ne i8 %a, %b
610 %or = or i1 %cmp1, %cmp2
614 define i1 @slt_sge(i8 %a, i8 %b) {
615 ; CHECK-LABEL: @slt_sge(
616 ; CHECK-NEXT: ret i1 true
618 %cmp1 = icmp slt i8 %a, %b
619 %cmp2 = icmp sge i8 %a, %b
620 %or = or i1 %cmp1, %cmp2
624 define i1 @slt_sgt(i8 %a, i8 %b) {
625 ; CHECK-LABEL: @slt_sgt(
626 ; CHECK-NEXT: [[CMP1:%.*]] = icmp slt i8 %a, %b
627 ; CHECK-NEXT: [[CMP2:%.*]] = icmp sgt i8 %a, %b
628 ; CHECK-NEXT: [[OR:%.*]] = or i1 [[CMP1]], [[CMP2]]
629 ; CHECK-NEXT: ret i1 [[OR]]
631 %cmp1 = icmp slt i8 %a, %b
632 %cmp2 = icmp sgt i8 %a, %b
633 %or = or i1 %cmp1, %cmp2
637 define i1 @slt_sle(i8 %a, i8 %b) {
638 ; CHECK-LABEL: @slt_sle(
639 ; CHECK-NEXT: [[CMP2:%.*]] = icmp sle i8 %a, %b
640 ; CHECK-NEXT: ret i1 [[CMP2]]
642 %cmp1 = icmp slt i8 %a, %b
643 %cmp2 = icmp sle i8 %a, %b
644 %or = or i1 %cmp1, %cmp2
648 define i1 @slt_slt(i8 %a, i8 %b) {
649 ; CHECK-LABEL: @slt_slt(
650 ; CHECK-NEXT: [[CMP2:%.*]] = icmp slt i8 %a, %b
651 ; CHECK-NEXT: ret i1 [[CMP2]]
653 %cmp1 = icmp slt i8 %a, %b
654 %cmp2 = icmp slt i8 %a, %b
655 %or = or i1 %cmp1, %cmp2
659 define i1 @slt_uge(i8 %a, i8 %b) {
660 ; CHECK-LABEL: @slt_uge(
661 ; CHECK-NEXT: [[CMP1:%.*]] = icmp slt i8 %a, %b
662 ; CHECK-NEXT: [[CMP2:%.*]] = icmp uge i8 %a, %b
663 ; CHECK-NEXT: [[OR:%.*]] = or i1 [[CMP1]], [[CMP2]]
664 ; CHECK-NEXT: ret i1 [[OR]]
666 %cmp1 = icmp slt i8 %a, %b
667 %cmp2 = icmp uge i8 %a, %b
668 %or = or i1 %cmp1, %cmp2
672 define i1 @slt_ugt(i8 %a, i8 %b) {
673 ; CHECK-LABEL: @slt_ugt(
674 ; CHECK-NEXT: [[CMP1:%.*]] = icmp slt i8 %a, %b
675 ; CHECK-NEXT: [[CMP2:%.*]] = icmp ugt i8 %a, %b
676 ; CHECK-NEXT: [[OR:%.*]] = or i1 [[CMP1]], [[CMP2]]
677 ; CHECK-NEXT: ret i1 [[OR]]
679 %cmp1 = icmp slt i8 %a, %b
680 %cmp2 = icmp ugt i8 %a, %b
681 %or = or i1 %cmp1, %cmp2
685 define i1 @slt_ule(i8 %a, i8 %b) {
686 ; CHECK-LABEL: @slt_ule(
687 ; CHECK-NEXT: [[CMP1:%.*]] = icmp slt i8 %a, %b
688 ; CHECK-NEXT: [[CMP2:%.*]] = icmp ule i8 %a, %b
689 ; CHECK-NEXT: [[OR:%.*]] = or i1 [[CMP1]], [[CMP2]]
690 ; CHECK-NEXT: ret i1 [[OR]]
692 %cmp1 = icmp slt i8 %a, %b
693 %cmp2 = icmp ule i8 %a, %b
694 %or = or i1 %cmp1, %cmp2
698 define i1 @slt_ult(i8 %a, i8 %b) {
699 ; CHECK-LABEL: @slt_ult(
700 ; CHECK-NEXT: [[CMP1:%.*]] = icmp slt i8 %a, %b
701 ; CHECK-NEXT: [[CMP2:%.*]] = icmp ult i8 %a, %b
702 ; CHECK-NEXT: [[OR:%.*]] = or i1 [[CMP1]], [[CMP2]]
703 ; CHECK-NEXT: ret i1 [[OR]]
705 %cmp1 = icmp slt i8 %a, %b
706 %cmp2 = icmp ult i8 %a, %b
707 %or = or i1 %cmp1, %cmp2
713 define i1 @uge_eq(i8 %a, i8 %b) {
714 ; CHECK-LABEL: @uge_eq(
715 ; CHECK-NEXT: [[CMP1:%.*]] = icmp uge i8 %a, %b
716 ; CHECK-NEXT: ret i1 [[CMP1]]
718 %cmp1 = icmp uge i8 %a, %b
719 %cmp2 = icmp eq i8 %a, %b
720 %or = or i1 %cmp1, %cmp2
724 define i1 @uge_ne(i8 %a, i8 %b) {
725 ; CHECK-LABEL: @uge_ne(
726 ; CHECK-NEXT: ret i1 true
728 %cmp1 = icmp uge i8 %a, %b
729 %cmp2 = icmp ne i8 %a, %b
730 %or = or i1 %cmp1, %cmp2
734 define i1 @uge_sge(i8 %a, i8 %b) {
735 ; CHECK-LABEL: @uge_sge(
736 ; CHECK-NEXT: [[CMP1:%.*]] = icmp uge i8 %a, %b
737 ; CHECK-NEXT: [[CMP2:%.*]] = icmp sge i8 %a, %b
738 ; CHECK-NEXT: [[OR:%.*]] = or i1 [[CMP1]], [[CMP2]]
739 ; CHECK-NEXT: ret i1 [[OR]]
741 %cmp1 = icmp uge i8 %a, %b
742 %cmp2 = icmp sge i8 %a, %b
743 %or = or i1 %cmp1, %cmp2
747 define i1 @uge_sgt(i8 %a, i8 %b) {
748 ; CHECK-LABEL: @uge_sgt(
749 ; CHECK-NEXT: [[CMP1:%.*]] = icmp uge i8 %a, %b
750 ; CHECK-NEXT: [[CMP2:%.*]] = icmp sgt i8 %a, %b
751 ; CHECK-NEXT: [[OR:%.*]] = or i1 [[CMP1]], [[CMP2]]
752 ; CHECK-NEXT: ret i1 [[OR]]
754 %cmp1 = icmp uge i8 %a, %b
755 %cmp2 = icmp sgt i8 %a, %b
756 %or = or i1 %cmp1, %cmp2
760 define i1 @uge_sle(i8 %a, i8 %b) {
761 ; CHECK-LABEL: @uge_sle(
762 ; CHECK-NEXT: [[CMP1:%.*]] = icmp uge i8 %a, %b
763 ; CHECK-NEXT: [[CMP2:%.*]] = icmp sle i8 %a, %b
764 ; CHECK-NEXT: [[OR:%.*]] = or i1 [[CMP1]], [[CMP2]]
765 ; CHECK-NEXT: ret i1 [[OR]]
767 %cmp1 = icmp uge i8 %a, %b
768 %cmp2 = icmp sle i8 %a, %b
769 %or = or i1 %cmp1, %cmp2
773 define i1 @uge_slt(i8 %a, i8 %b) {
774 ; CHECK-LABEL: @uge_slt(
775 ; CHECK-NEXT: [[CMP1:%.*]] = icmp uge i8 %a, %b
776 ; CHECK-NEXT: [[CMP2:%.*]] = icmp slt i8 %a, %b
777 ; CHECK-NEXT: [[OR:%.*]] = or i1 [[CMP1]], [[CMP2]]
778 ; CHECK-NEXT: ret i1 [[OR]]
780 %cmp1 = icmp uge i8 %a, %b
781 %cmp2 = icmp slt i8 %a, %b
782 %or = or i1 %cmp1, %cmp2
786 define i1 @uge_uge(i8 %a, i8 %b) {
787 ; CHECK-LABEL: @uge_uge(
788 ; CHECK-NEXT: [[CMP2:%.*]] = icmp uge i8 %a, %b
789 ; CHECK-NEXT: ret i1 [[CMP2]]
791 %cmp1 = icmp uge i8 %a, %b
792 %cmp2 = icmp uge i8 %a, %b
793 %or = or i1 %cmp1, %cmp2
797 define i1 @uge_ugt(i8 %a, i8 %b) {
798 ; CHECK-LABEL: @uge_ugt(
799 ; CHECK-NEXT: [[CMP1:%.*]] = icmp uge i8 %a, %b
800 ; CHECK-NEXT: ret i1 [[CMP1]]
802 %cmp1 = icmp uge i8 %a, %b
803 %cmp2 = icmp ugt i8 %a, %b
804 %or = or i1 %cmp1, %cmp2
808 define i1 @uge_ule(i8 %a, i8 %b) {
809 ; CHECK-LABEL: @uge_ule(
810 ; CHECK-NEXT: ret i1 true
812 %cmp1 = icmp uge i8 %a, %b
813 %cmp2 = icmp ule i8 %a, %b
814 %or = or i1 %cmp1, %cmp2
818 define i1 @uge_ult(i8 %a, i8 %b) {
819 ; CHECK-LABEL: @uge_ult(
820 ; CHECK-NEXT: ret i1 true
822 %cmp1 = icmp uge i8 %a, %b
823 %cmp2 = icmp ult i8 %a, %b
824 %or = or i1 %cmp1, %cmp2
830 define i1 @ugt_eq(i8 %a, i8 %b) {
831 ; CHECK-LABEL: @ugt_eq(
832 ; CHECK-NEXT: [[CMP1:%.*]] = icmp ugt i8 %a, %b
833 ; CHECK-NEXT: [[CMP2:%.*]] = icmp eq i8 %a, %b
834 ; CHECK-NEXT: [[OR:%.*]] = or i1 [[CMP1]], [[CMP2]]
835 ; CHECK-NEXT: ret i1 [[OR]]
837 %cmp1 = icmp ugt i8 %a, %b
838 %cmp2 = icmp eq i8 %a, %b
839 %or = or i1 %cmp1, %cmp2
843 define i1 @ugt_ne(i8 %a, i8 %b) {
844 ; CHECK-LABEL: @ugt_ne(
845 ; CHECK-NEXT: [[CMP2:%.*]] = icmp ne i8 %a, %b
846 ; CHECK-NEXT: ret i1 [[CMP2]]
848 %cmp1 = icmp ugt i8 %a, %b
849 %cmp2 = icmp ne i8 %a, %b
850 %or = or i1 %cmp1, %cmp2
854 define i1 @ugt_sge(i8 %a, i8 %b) {
855 ; CHECK-LABEL: @ugt_sge(
856 ; CHECK-NEXT: [[CMP1:%.*]] = icmp ugt i8 %a, %b
857 ; CHECK-NEXT: [[CMP2:%.*]] = icmp sge i8 %a, %b
858 ; CHECK-NEXT: [[OR:%.*]] = or i1 [[CMP1]], [[CMP2]]
859 ; CHECK-NEXT: ret i1 [[OR]]
861 %cmp1 = icmp ugt i8 %a, %b
862 %cmp2 = icmp sge i8 %a, %b
863 %or = or i1 %cmp1, %cmp2
867 define i1 @ugt_sgt(i8 %a, i8 %b) {
868 ; CHECK-LABEL: @ugt_sgt(
869 ; CHECK-NEXT: [[CMP1:%.*]] = icmp ugt i8 %a, %b
870 ; CHECK-NEXT: [[CMP2:%.*]] = icmp sgt i8 %a, %b
871 ; CHECK-NEXT: [[OR:%.*]] = or i1 [[CMP1]], [[CMP2]]
872 ; CHECK-NEXT: ret i1 [[OR]]
874 %cmp1 = icmp ugt i8 %a, %b
875 %cmp2 = icmp sgt i8 %a, %b
876 %or = or i1 %cmp1, %cmp2
880 define i1 @ugt_sle(i8 %a, i8 %b) {
881 ; CHECK-LABEL: @ugt_sle(
882 ; CHECK-NEXT: [[CMP1:%.*]] = icmp ugt i8 %a, %b
883 ; CHECK-NEXT: [[CMP2:%.*]] = icmp sle i8 %a, %b
884 ; CHECK-NEXT: [[OR:%.*]] = or i1 [[CMP1]], [[CMP2]]
885 ; CHECK-NEXT: ret i1 [[OR]]
887 %cmp1 = icmp ugt i8 %a, %b
888 %cmp2 = icmp sle i8 %a, %b
889 %or = or i1 %cmp1, %cmp2
893 define i1 @ugt_slt(i8 %a, i8 %b) {
894 ; CHECK-LABEL: @ugt_slt(
895 ; CHECK-NEXT: [[CMP1:%.*]] = icmp ugt i8 %a, %b
896 ; CHECK-NEXT: [[CMP2:%.*]] = icmp slt i8 %a, %b
897 ; CHECK-NEXT: [[OR:%.*]] = or i1 [[CMP1]], [[CMP2]]
898 ; CHECK-NEXT: ret i1 [[OR]]
900 %cmp1 = icmp ugt i8 %a, %b
901 %cmp2 = icmp slt i8 %a, %b
902 %or = or i1 %cmp1, %cmp2
906 define i1 @ugt_uge(i8 %a, i8 %b) {
907 ; CHECK-LABEL: @ugt_uge(
908 ; CHECK-NEXT: [[CMP2:%.*]] = icmp uge i8 %a, %b
909 ; CHECK-NEXT: ret i1 [[CMP2]]
911 %cmp1 = icmp ugt i8 %a, %b
912 %cmp2 = icmp uge i8 %a, %b
913 %or = or i1 %cmp1, %cmp2
917 define i1 @ugt_ugt(i8 %a, i8 %b) {
918 ; CHECK-LABEL: @ugt_ugt(
919 ; CHECK-NEXT: [[CMP2:%.*]] = icmp ugt i8 %a, %b
920 ; CHECK-NEXT: ret i1 [[CMP2]]
922 %cmp1 = icmp ugt i8 %a, %b
923 %cmp2 = icmp ugt i8 %a, %b
924 %or = or i1 %cmp1, %cmp2
928 define i1 @ugt_ule(i8 %a, i8 %b) {
929 ; CHECK-LABEL: @ugt_ule(
930 ; CHECK-NEXT: ret i1 true
932 %cmp1 = icmp ugt i8 %a, %b
933 %cmp2 = icmp ule i8 %a, %b
934 %or = or i1 %cmp1, %cmp2
938 define i1 @ugt_ult(i8 %a, i8 %b) {
939 ; CHECK-LABEL: @ugt_ult(
940 ; CHECK-NEXT: [[CMP1:%.*]] = icmp ugt i8 %a, %b
941 ; CHECK-NEXT: [[CMP2:%.*]] = icmp ult i8 %a, %b
942 ; CHECK-NEXT: [[OR:%.*]] = or i1 [[CMP1]], [[CMP2]]
943 ; CHECK-NEXT: ret i1 [[OR]]
945 %cmp1 = icmp ugt i8 %a, %b
946 %cmp2 = icmp ult i8 %a, %b
947 %or = or i1 %cmp1, %cmp2
953 define i1 @ule_eq(i8 %a, i8 %b) {
954 ; CHECK-LABEL: @ule_eq(
955 ; CHECK-NEXT: [[CMP1:%.*]] = icmp ule i8 %a, %b
956 ; CHECK-NEXT: ret i1 [[CMP1]]
958 %cmp1 = icmp ule i8 %a, %b
959 %cmp2 = icmp eq i8 %a, %b
960 %or = or i1 %cmp1, %cmp2
964 define i1 @ule_ne(i8 %a, i8 %b) {
965 ; CHECK-LABEL: @ule_ne(
966 ; CHECK-NEXT: ret i1 true
968 %cmp1 = icmp ule i8 %a, %b
969 %cmp2 = icmp ne i8 %a, %b
970 %or = or i1 %cmp1, %cmp2
974 define i1 @ule_sge(i8 %a, i8 %b) {
975 ; CHECK-LABEL: @ule_sge(
976 ; CHECK-NEXT: [[CMP1:%.*]] = icmp ule i8 %a, %b
977 ; CHECK-NEXT: [[CMP2:%.*]] = icmp sge i8 %a, %b
978 ; CHECK-NEXT: [[OR:%.*]] = or i1 [[CMP1]], [[CMP2]]
979 ; CHECK-NEXT: ret i1 [[OR]]
981 %cmp1 = icmp ule i8 %a, %b
982 %cmp2 = icmp sge i8 %a, %b
983 %or = or i1 %cmp1, %cmp2
987 define i1 @ule_sgt(i8 %a, i8 %b) {
988 ; CHECK-LABEL: @ule_sgt(
989 ; CHECK-NEXT: [[CMP1:%.*]] = icmp ule i8 %a, %b
990 ; CHECK-NEXT: [[CMP2:%.*]] = icmp sgt i8 %a, %b
991 ; CHECK-NEXT: [[OR:%.*]] = or i1 [[CMP1]], [[CMP2]]
992 ; CHECK-NEXT: ret i1 [[OR]]
994 %cmp1 = icmp ule i8 %a, %b
995 %cmp2 = icmp sgt i8 %a, %b
996 %or = or i1 %cmp1, %cmp2
1000 define i1 @ule_sle(i8 %a, i8 %b) {
1001 ; CHECK-LABEL: @ule_sle(
1002 ; CHECK-NEXT: [[CMP1:%.*]] = icmp ule i8 %a, %b
1003 ; CHECK-NEXT: [[CMP2:%.*]] = icmp sle i8 %a, %b
1004 ; CHECK-NEXT: [[OR:%.*]] = or i1 [[CMP1]], [[CMP2]]
1005 ; CHECK-NEXT: ret i1 [[OR]]
1007 %cmp1 = icmp ule i8 %a, %b
1008 %cmp2 = icmp sle i8 %a, %b
1009 %or = or i1 %cmp1, %cmp2
1013 define i1 @ule_slt(i8 %a, i8 %b) {
1014 ; CHECK-LABEL: @ule_slt(
1015 ; CHECK-NEXT: [[CMP1:%.*]] = icmp ule i8 %a, %b
1016 ; CHECK-NEXT: [[CMP2:%.*]] = icmp slt i8 %a, %b
1017 ; CHECK-NEXT: [[OR:%.*]] = or i1 [[CMP1]], [[CMP2]]
1018 ; CHECK-NEXT: ret i1 [[OR]]
1020 %cmp1 = icmp ule i8 %a, %b
1021 %cmp2 = icmp slt i8 %a, %b
1022 %or = or i1 %cmp1, %cmp2
1026 define i1 @ule_uge(i8 %a, i8 %b) {
1027 ; CHECK-LABEL: @ule_uge(
1028 ; CHECK-NEXT: ret i1 true
1030 %cmp1 = icmp ule i8 %a, %b
1031 %cmp2 = icmp uge i8 %a, %b
1032 %or = or i1 %cmp1, %cmp2
1036 define i1 @ule_ugt(i8 %a, i8 %b) {
1037 ; CHECK-LABEL: @ule_ugt(
1038 ; CHECK-NEXT: ret i1 true
1040 %cmp1 = icmp ule i8 %a, %b
1041 %cmp2 = icmp ugt i8 %a, %b
1042 %or = or i1 %cmp1, %cmp2
1046 define i1 @ule_ule(i8 %a, i8 %b) {
1047 ; CHECK-LABEL: @ule_ule(
1048 ; CHECK-NEXT: [[CMP2:%.*]] = icmp ule i8 %a, %b
1049 ; CHECK-NEXT: ret i1 [[CMP2]]
1051 %cmp1 = icmp ule i8 %a, %b
1052 %cmp2 = icmp ule i8 %a, %b
1053 %or = or i1 %cmp1, %cmp2
1057 define i1 @ule_ult(i8 %a, i8 %b) {
1058 ; CHECK-LABEL: @ule_ult(
1059 ; CHECK-NEXT: [[CMP1:%.*]] = icmp ule i8 %a, %b
1060 ; CHECK-NEXT: ret i1 [[CMP1]]
1062 %cmp1 = icmp ule i8 %a, %b
1063 %cmp2 = icmp ult i8 %a, %b
1064 %or = or i1 %cmp1, %cmp2
1070 define i1 @ult_eq(i8 %a, i8 %b) {
1071 ; CHECK-LABEL: @ult_eq(
1072 ; CHECK-NEXT: [[CMP1:%.*]] = icmp ult i8 %a, %b
1073 ; CHECK-NEXT: [[CMP2:%.*]] = icmp eq i8 %a, %b
1074 ; CHECK-NEXT: [[OR:%.*]] = or i1 [[CMP1]], [[CMP2]]
1075 ; CHECK-NEXT: ret i1 [[OR]]
1077 %cmp1 = icmp ult i8 %a, %b
1078 %cmp2 = icmp eq i8 %a, %b
1079 %or = or i1 %cmp1, %cmp2
1083 define i1 @ult_ne(i8 %a, i8 %b) {
1084 ; CHECK-LABEL: @ult_ne(
1085 ; CHECK-NEXT: [[CMP2:%.*]] = icmp ne i8 %a, %b
1086 ; CHECK-NEXT: ret i1 [[CMP2]]
1088 %cmp1 = icmp ult i8 %a, %b
1089 %cmp2 = icmp ne i8 %a, %b
1090 %or = or i1 %cmp1, %cmp2
1094 define i1 @ult_sge(i8 %a, i8 %b) {
1095 ; CHECK-LABEL: @ult_sge(
1096 ; CHECK-NEXT: [[CMP1:%.*]] = icmp ult i8 %a, %b
1097 ; CHECK-NEXT: [[CMP2:%.*]] = icmp sge i8 %a, %b
1098 ; CHECK-NEXT: [[OR:%.*]] = or i1 [[CMP1]], [[CMP2]]
1099 ; CHECK-NEXT: ret i1 [[OR]]
1101 %cmp1 = icmp ult i8 %a, %b
1102 %cmp2 = icmp sge i8 %a, %b
1103 %or = or i1 %cmp1, %cmp2
1107 define i1 @ult_sgt(i8 %a, i8 %b) {
1108 ; CHECK-LABEL: @ult_sgt(
1109 ; CHECK-NEXT: [[CMP1:%.*]] = icmp ult i8 %a, %b
1110 ; CHECK-NEXT: [[CMP2:%.*]] = icmp sgt i8 %a, %b
1111 ; CHECK-NEXT: [[OR:%.*]] = or i1 [[CMP1]], [[CMP2]]
1112 ; CHECK-NEXT: ret i1 [[OR]]
1114 %cmp1 = icmp ult i8 %a, %b
1115 %cmp2 = icmp sgt i8 %a, %b
1116 %or = or i1 %cmp1, %cmp2
1120 define i1 @ult_sle(i8 %a, i8 %b) {
1121 ; CHECK-LABEL: @ult_sle(
1122 ; CHECK-NEXT: [[CMP1:%.*]] = icmp ult i8 %a, %b
1123 ; CHECK-NEXT: [[CMP2:%.*]] = icmp sle i8 %a, %b
1124 ; CHECK-NEXT: [[OR:%.*]] = or i1 [[CMP1]], [[CMP2]]
1125 ; CHECK-NEXT: ret i1 [[OR]]
1127 %cmp1 = icmp ult i8 %a, %b
1128 %cmp2 = icmp sle i8 %a, %b
1129 %or = or i1 %cmp1, %cmp2
1133 define i1 @ult_slt(i8 %a, i8 %b) {
1134 ; CHECK-LABEL: @ult_slt(
1135 ; CHECK-NEXT: [[CMP1:%.*]] = icmp ult i8 %a, %b
1136 ; CHECK-NEXT: [[CMP2:%.*]] = icmp slt i8 %a, %b
1137 ; CHECK-NEXT: [[OR:%.*]] = or i1 [[CMP1]], [[CMP2]]
1138 ; CHECK-NEXT: ret i1 [[OR]]
1140 %cmp1 = icmp ult i8 %a, %b
1141 %cmp2 = icmp slt i8 %a, %b
1142 %or = or i1 %cmp1, %cmp2
1146 define i1 @ult_uge(i8 %a, i8 %b) {
1147 ; CHECK-LABEL: @ult_uge(
1148 ; CHECK-NEXT: ret i1 true
1150 %cmp1 = icmp ult i8 %a, %b
1151 %cmp2 = icmp uge i8 %a, %b
1152 %or = or i1 %cmp1, %cmp2
1156 define i1 @ult_ugt(i8 %a, i8 %b) {
1157 ; CHECK-LABEL: @ult_ugt(
1158 ; CHECK-NEXT: [[CMP1:%.*]] = icmp ult i8 %a, %b
1159 ; CHECK-NEXT: [[CMP2:%.*]] = icmp ugt i8 %a, %b
1160 ; CHECK-NEXT: [[OR:%.*]] = or i1 [[CMP1]], [[CMP2]]
1161 ; CHECK-NEXT: ret i1 [[OR]]
1163 %cmp1 = icmp ult i8 %a, %b
1164 %cmp2 = icmp ugt i8 %a, %b
1165 %or = or i1 %cmp1, %cmp2
1169 define i1 @ult_ule(i8 %a, i8 %b) {
1170 ; CHECK-LABEL: @ult_ule(
1171 ; CHECK-NEXT: [[CMP2:%.*]] = icmp ule i8 %a, %b
1172 ; CHECK-NEXT: ret i1 [[CMP2]]
1174 %cmp1 = icmp ult i8 %a, %b
1175 %cmp2 = icmp ule i8 %a, %b
1176 %or = or i1 %cmp1, %cmp2
1180 define i1 @ult_ult(i8 %a, i8 %b) {
1181 ; CHECK-LABEL: @ult_ult(
1182 ; CHECK-NEXT: [[CMP2:%.*]] = icmp ult i8 %a, %b
1183 ; CHECK-NEXT: ret i1 [[CMP2]]
1185 %cmp1 = icmp ult i8 %a, %b
1186 %cmp2 = icmp ult i8 %a, %b
1187 %or = or i1 %cmp1, %cmp2
1191 ; Check a couple of vector variants to make sure those work too.
1193 define <2 x i1> @ult_uge_vec(<2 x i8> %a, <2 x i8> %b) {
1194 ; CHECK-LABEL: @ult_uge_vec(
1195 ; CHECK-NEXT: ret <2 x i1> <i1 true, i1 true>
1197 %cmp1 = icmp ult <2 x i8> %a, %b
1198 %cmp2 = icmp uge <2 x i8> %a, %b
1199 %or = or <2 x i1> %cmp1, %cmp2
1203 define <2 x i1> @ult_ule_vec(<2 x i8> %a, <2 x i8> %b) {
1204 ; CHECK-LABEL: @ult_ule_vec(
1205 ; CHECK-NEXT: [[CMP2:%.*]] = icmp ule <2 x i8> %a, %b
1206 ; CHECK-NEXT: ret <2 x i1> [[CMP2]]
1208 %cmp1 = icmp ult <2 x i8> %a, %b
1209 %cmp2 = icmp ule <2 x i8> %a, %b
1210 %or = or <2 x i1> %cmp1, %cmp2
1214 define i1 @ult_ne_swap(i8 %a, i8 %b) {
1215 ; CHECK-LABEL: @ult_ne_swap(
1216 ; CHECK-NEXT: [[CMP1:%.*]] = icmp ult i8 %a, %b
1217 ; CHECK-NEXT: [[CMP2:%.*]] = icmp ne i8 %b, %a
1218 ; CHECK-NEXT: [[OR:%.*]] = or i1 [[CMP1]], [[CMP2]]
1219 ; CHECK-NEXT: ret i1 [[OR]]
1221 %cmp1 = icmp ult i8 %a, %b
1222 %cmp2 = icmp ne i8 %b, %a
1223 %or = or i1 %cmp1, %cmp2
1227 define i1 @ult_ule_swap(i8 %a, i8 %b) {
1228 ; CHECK-LABEL: @ult_ule_swap(
1229 ; CHECK-NEXT: [[CMP1:%.*]] = icmp ult i8 %a, %b
1230 ; CHECK-NEXT: [[CMP2:%.*]] = icmp uge i8 %b, %a
1231 ; CHECK-NEXT: [[OR:%.*]] = or i1 [[CMP1]], [[CMP2]]
1232 ; CHECK-NEXT: ret i1 [[OR]]
1234 %cmp1 = icmp ult i8 %a, %b
1235 %cmp2 = icmp uge i8 %b, %a
1236 %or = or i1 %cmp1, %cmp2