Skip to content

Commit d0ccdb4

Browse files
committedDec 6, 2016
[InstSimplify] add folds for or-of-icmps with same operands
All of these (and a few more) are already handled by InstCombine, but we shouldn't have to wait until then to simplify these because they're cheap to deal with here in InstSimplify. llvm-svn: 288833
1 parent a2a32c2 commit d0ccdb4

File tree

2 files changed

+93
-200
lines changed

2 files changed

+93
-200
lines changed
 

‎llvm/lib/Analysis/InstructionSimplify.cpp

+34-2
Original file line numberDiff line numberDiff line change
@@ -1700,12 +1700,44 @@ Value *llvm::SimplifyAndInst(Value *Op0, Value *Op1, const DataLayout &DL,
17001700
RecursionLimit);
17011701
}
17021702

1703-
/// Simplify (or (icmp ...) (icmp ...)) to true when we can tell that the union
1704-
/// contains all possible values.
1703+
/// Commuted variants are assumed to be handled by calling this function again
1704+
/// with the parameters swapped.
1705+
static Value *simplifyOrOfICmpsWithSameOperands(ICmpInst *Op0, ICmpInst *Op1) {
1706+
ICmpInst::Predicate Pred0, Pred1;
1707+
Value *A ,*B;
1708+
match(Op0, m_ICmp(Pred0, m_Value(A), m_Value(B)));
1709+
if (match(Op1, m_ICmp(Pred1, m_Specific(B), m_Specific(A))))
1710+
Op1->swapOperands();
1711+
1712+
if (!match(Op1, m_ICmp(Pred1, m_Specific(A), m_Specific(B))))
1713+
return nullptr;
1714+
1715+
// We have (icmp Pred0, A, B) | (icmp Pred1, A, B).
1716+
// If Op1 is always implied true by Op0, then Op0 is a subset of Op1, and we
1717+
// can eliminate Op0 from this 'or'.
1718+
if (ICmpInst::isImpliedTrueByMatchingCmp(Pred0, Pred1))
1719+
return Op1;
1720+
1721+
// Check for any combination of predicates that cover the entire range of
1722+
// possibilities.
1723+
if ((Pred0 == ICmpInst::getInversePredicate(Pred1)) ||
1724+
(Pred0 == ICmpInst::ICMP_NE && ICmpInst::isTrueWhenEqual(Pred1)) ||
1725+
(Pred0 == ICmpInst::ICMP_SLE && Pred1 == ICmpInst::ICMP_SGE) ||
1726+
(Pred0 == ICmpInst::ICMP_ULE && Pred1 == ICmpInst::ICMP_UGE))
1727+
return getTrue(Op0->getType());
1728+
1729+
return nullptr;
1730+
}
1731+
1732+
/// Commuted variants are assumed to be handled by calling this function again
1733+
/// with the parameters swapped.
17051734
static Value *SimplifyOrOfICmps(ICmpInst *Op0, ICmpInst *Op1) {
17061735
if (Value *X = simplifyUnsignedRangeCheck(Op0, Op1, /*IsAnd=*/false))
17071736
return X;
17081737

1738+
if (Value *X = simplifyOrOfICmpsWithSameOperands(Op0, Op1))
1739+
return X;
1740+
17091741
// (icmp (add V, C0), C1) | (icmp V, C0)
17101742
ICmpInst::Predicate Pred0, Pred1;
17111743
const APInt *C0, *C1;

‎llvm/test/Transforms/InstSimplify/or-icmps-same-ops.ll

+59-198
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,12 @@
22
; RUN: opt < %s -instsimplify -S | FileCheck %s
33

44
; There are 10 * 10 combinations of icmp predicates that can be OR'd together.
5-
; FIXME: The majority of these can be simplified to always true or just one of the icmps.
5+
; The majority of these can be simplified to always true or just one of the icmps.
66

77
define i1 @eq_eq(i8 %a, i8 %b) {
88
; CHECK-LABEL: @eq_eq(
9-
; CHECK-NEXT: [[CMP1:%.*]] = icmp eq i8 %a, %b
109
; CHECK-NEXT: [[CMP2:%.*]] = icmp eq i8 %a, %b
11-
; CHECK-NEXT: [[OR:%.*]] = or i1 [[CMP1]], [[CMP2]]
12-
; CHECK-NEXT: ret i1 [[OR]]
10+
; CHECK-NEXT: ret i1 [[CMP2]]
1311
;
1412
%cmp1 = icmp eq i8 %a, %b
1513
%cmp2 = icmp eq i8 %a, %b
@@ -19,10 +17,7 @@ define i1 @eq_eq(i8 %a, i8 %b) {
1917

2018
define i1 @eq_ne(i8 %a, i8 %b) {
2119
; CHECK-LABEL: @eq_ne(
22-
; CHECK-NEXT: [[CMP1:%.*]] = icmp eq i8 %a, %b
23-
; CHECK-NEXT: [[CMP2:%.*]] = icmp ne i8 %a, %b
24-
; CHECK-NEXT: [[OR:%.*]] = or i1 [[CMP1]], [[CMP2]]
25-
; CHECK-NEXT: ret i1 [[OR]]
20+
; CHECK-NEXT: ret i1 true
2621
;
2722
%cmp1 = icmp eq i8 %a, %b
2823
%cmp2 = icmp ne i8 %a, %b
@@ -32,10 +27,8 @@ define i1 @eq_ne(i8 %a, i8 %b) {
3227

3328
define i1 @eq_sge(i8 %a, i8 %b) {
3429
; CHECK-LABEL: @eq_sge(
35-
; CHECK-NEXT: [[CMP1:%.*]] = icmp eq i8 %a, %b
3630
; CHECK-NEXT: [[CMP2:%.*]] = icmp sge i8 %a, %b
37-
; CHECK-NEXT: [[OR:%.*]] = or i1 [[CMP1]], [[CMP2]]
38-
; CHECK-NEXT: ret i1 [[OR]]
31+
; CHECK-NEXT: ret i1 [[CMP2]]
3932
;
4033
%cmp1 = icmp eq i8 %a, %b
4134
%cmp2 = icmp sge i8 %a, %b
@@ -58,10 +51,8 @@ define i1 @eq_sgt(i8 %a, i8 %b) {
5851

5952
define i1 @eq_sle(i8 %a, i8 %b) {
6053
; CHECK-LABEL: @eq_sle(
61-
; CHECK-NEXT: [[CMP1:%.*]] = icmp eq i8 %a, %b
6254
; CHECK-NEXT: [[CMP2:%.*]] = icmp sle i8 %a, %b
63-
; CHECK-NEXT: [[OR:%.*]] = or i1 [[CMP1]], [[CMP2]]
64-
; CHECK-NEXT: ret i1 [[OR]]
55+
; CHECK-NEXT: ret i1 [[CMP2]]
6556
;
6657
%cmp1 = icmp eq i8 %a, %b
6758
%cmp2 = icmp sle i8 %a, %b
@@ -84,10 +75,8 @@ define i1 @eq_slt(i8 %a, i8 %b) {
8475

8576
define i1 @eq_uge(i8 %a, i8 %b) {
8677
; CHECK-LABEL: @eq_uge(
87-
; CHECK-NEXT: [[CMP1:%.*]] = icmp eq i8 %a, %b
8878
; CHECK-NEXT: [[CMP2:%.*]] = icmp uge i8 %a, %b
89-
; CHECK-NEXT: [[OR:%.*]] = or i1 [[CMP1]], [[CMP2]]
90-
; CHECK-NEXT: ret i1 [[OR]]
79+
; CHECK-NEXT: ret i1 [[CMP2]]
9180
;
9281
%cmp1 = icmp eq i8 %a, %b
9382
%cmp2 = icmp uge i8 %a, %b
@@ -110,10 +99,8 @@ define i1 @eq_ugt(i8 %a, i8 %b) {
11099

111100
define i1 @eq_ule(i8 %a, i8 %b) {
112101
; CHECK-LABEL: @eq_ule(
113-
; CHECK-NEXT: [[CMP1:%.*]] = icmp eq i8 %a, %b
114102
; CHECK-NEXT: [[CMP2:%.*]] = icmp ule i8 %a, %b
115-
; CHECK-NEXT: [[OR:%.*]] = or i1 [[CMP1]], [[CMP2]]
116-
; CHECK-NEXT: ret i1 [[OR]]
103+
; CHECK-NEXT: ret i1 [[CMP2]]
117104
;
118105
%cmp1 = icmp eq i8 %a, %b
119106
%cmp2 = icmp ule i8 %a, %b
@@ -138,10 +125,7 @@ define i1 @eq_ult(i8 %a, i8 %b) {
138125

139126
define i1 @ne_eq(i8 %a, i8 %b) {
140127
; CHECK-LABEL: @ne_eq(
141-
; CHECK-NEXT: [[CMP1:%.*]] = icmp ne i8 %a, %b
142-
; CHECK-NEXT: [[CMP2:%.*]] = icmp eq i8 %a, %b
143-
; CHECK-NEXT: [[OR:%.*]] = or i1 [[CMP1]], [[CMP2]]
144-
; CHECK-NEXT: ret i1 [[OR]]
128+
; CHECK-NEXT: ret i1 true
145129
;
146130
%cmp1 = icmp ne i8 %a, %b
147131
%cmp2 = icmp eq i8 %a, %b
@@ -151,10 +135,8 @@ define i1 @ne_eq(i8 %a, i8 %b) {
151135

152136
define i1 @ne_ne(i8 %a, i8 %b) {
153137
; CHECK-LABEL: @ne_ne(
154-
; CHECK-NEXT: [[CMP1:%.*]] = icmp ne i8 %a, %b
155138
; CHECK-NEXT: [[CMP2:%.*]] = icmp ne i8 %a, %b
156-
; CHECK-NEXT: [[OR:%.*]] = or i1 [[CMP1]], [[CMP2]]
157-
; CHECK-NEXT: ret i1 [[OR]]
139+
; CHECK-NEXT: ret i1 [[CMP2]]
158140
;
159141
%cmp1 = icmp ne i8 %a, %b
160142
%cmp2 = icmp ne i8 %a, %b
@@ -164,10 +146,7 @@ define i1 @ne_ne(i8 %a, i8 %b) {
164146

165147
define i1 @ne_sge(i8 %a, i8 %b) {
166148
; CHECK-LABEL: @ne_sge(
167-
; CHECK-NEXT: [[CMP1:%.*]] = icmp ne i8 %a, %b
168-
; CHECK-NEXT: [[CMP2:%.*]] = icmp sge i8 %a, %b
169-
; CHECK-NEXT: [[OR:%.*]] = or i1 [[CMP1]], [[CMP2]]
170-
; CHECK-NEXT: ret i1 [[OR]]
149+
; CHECK-NEXT: ret i1 true
171150
;
172151
%cmp1 = icmp ne i8 %a, %b
173152
%cmp2 = icmp sge i8 %a, %b
@@ -178,9 +157,7 @@ define i1 @ne_sge(i8 %a, i8 %b) {
178157
define i1 @ne_sgt(i8 %a, i8 %b) {
179158
; CHECK-LABEL: @ne_sgt(
180159
; CHECK-NEXT: [[CMP1:%.*]] = icmp ne i8 %a, %b
181-
; CHECK-NEXT: [[CMP2:%.*]] = icmp sgt i8 %a, %b
182-
; CHECK-NEXT: [[OR:%.*]] = or i1 [[CMP1]], [[CMP2]]
183-
; CHECK-NEXT: ret i1 [[OR]]
160+
; CHECK-NEXT: ret i1 [[CMP1]]
184161
;
185162
%cmp1 = icmp ne i8 %a, %b
186163
%cmp2 = icmp sgt i8 %a, %b
@@ -190,10 +167,7 @@ define i1 @ne_sgt(i8 %a, i8 %b) {
190167

191168
define i1 @ne_sle(i8 %a, i8 %b) {
192169
; CHECK-LABEL: @ne_sle(
193-
; CHECK-NEXT: [[CMP1:%.*]] = icmp ne i8 %a, %b
194-
; CHECK-NEXT: [[CMP2:%.*]] = icmp sle i8 %a, %b
195-
; CHECK-NEXT: [[OR:%.*]] = or i1 [[CMP1]], [[CMP2]]
196-
; CHECK-NEXT: ret i1 [[OR]]
170+
; CHECK-NEXT: ret i1 true
197171
;
198172
%cmp1 = icmp ne i8 %a, %b
199173
%cmp2 = icmp sle i8 %a, %b
@@ -204,9 +178,7 @@ define i1 @ne_sle(i8 %a, i8 %b) {
204178
define i1 @ne_slt(i8 %a, i8 %b) {
205179
; CHECK-LABEL: @ne_slt(
206180
; CHECK-NEXT: [[CMP1:%.*]] = icmp ne i8 %a, %b
207-
; CHECK-NEXT: [[CMP2:%.*]] = icmp slt i8 %a, %b
208-
; CHECK-NEXT: [[OR:%.*]] = or i1 [[CMP1]], [[CMP2]]
209-
; CHECK-NEXT: ret i1 [[OR]]
181+
; CHECK-NEXT: ret i1 [[CMP1]]
210182
;
211183
%cmp1 = icmp ne i8 %a, %b
212184
%cmp2 = icmp slt i8 %a, %b
@@ -216,10 +188,7 @@ define i1 @ne_slt(i8 %a, i8 %b) {
216188

217189
define i1 @ne_uge(i8 %a, i8 %b) {
218190
; CHECK-LABEL: @ne_uge(
219-
; CHECK-NEXT: [[CMP1:%.*]] = icmp ne i8 %a, %b
220-
; CHECK-NEXT: [[CMP2:%.*]] = icmp uge i8 %a, %b
221-
; CHECK-NEXT: [[OR:%.*]] = or i1 [[CMP1]], [[CMP2]]
222-
; CHECK-NEXT: ret i1 [[OR]]
191+
; CHECK-NEXT: ret i1 true
223192
;
224193
%cmp1 = icmp ne i8 %a, %b
225194
%cmp2 = icmp uge i8 %a, %b
@@ -230,9 +199,7 @@ define i1 @ne_uge(i8 %a, i8 %b) {
230199
define i1 @ne_ugt(i8 %a, i8 %b) {
231200
; CHECK-LABEL: @ne_ugt(
232201
; CHECK-NEXT: [[CMP1:%.*]] = icmp ne i8 %a, %b
233-
; CHECK-NEXT: [[CMP2:%.*]] = icmp ugt i8 %a, %b
234-
; CHECK-NEXT: [[OR:%.*]] = or i1 [[CMP1]], [[CMP2]]
235-
; CHECK-NEXT: ret i1 [[OR]]
202+
; CHECK-NEXT: ret i1 [[CMP1]]
236203
;
237204
%cmp1 = icmp ne i8 %a, %b
238205
%cmp2 = icmp ugt i8 %a, %b
@@ -242,10 +209,7 @@ define i1 @ne_ugt(i8 %a, i8 %b) {
242209

243210
define i1 @ne_ule(i8 %a, i8 %b) {
244211
; CHECK-LABEL: @ne_ule(
245-
; CHECK-NEXT: [[CMP1:%.*]] = icmp ne i8 %a, %b
246-
; CHECK-NEXT: [[CMP2:%.*]] = icmp ule i8 %a, %b
247-
; CHECK-NEXT: [[OR:%.*]] = or i1 [[CMP1]], [[CMP2]]
248-
; CHECK-NEXT: ret i1 [[OR]]
212+
; CHECK-NEXT: ret i1 true
249213
;
250214
%cmp1 = icmp ne i8 %a, %b
251215
%cmp2 = icmp ule i8 %a, %b
@@ -256,9 +220,7 @@ define i1 @ne_ule(i8 %a, i8 %b) {
256220
define i1 @ne_ult(i8 %a, i8 %b) {
257221
; CHECK-LABEL: @ne_ult(
258222
; CHECK-NEXT: [[CMP1:%.*]] = icmp ne i8 %a, %b
259-
; CHECK-NEXT: [[CMP2:%.*]] = icmp ult i8 %a, %b
260-
; CHECK-NEXT: [[OR:%.*]] = or i1 [[CMP1]], [[CMP2]]
261-
; CHECK-NEXT: ret i1 [[OR]]
223+
; CHECK-NEXT: ret i1 [[CMP1]]
262224
;
263225
%cmp1 = icmp ne i8 %a, %b
264226
%cmp2 = icmp ult i8 %a, %b
@@ -271,9 +233,7 @@ define i1 @ne_ult(i8 %a, i8 %b) {
271233
define i1 @sge_eq(i8 %a, i8 %b) {
272234
; CHECK-LABEL: @sge_eq(
273235
; CHECK-NEXT: [[CMP1:%.*]] = icmp sge i8 %a, %b
274-
; CHECK-NEXT: [[CMP2:%.*]] = icmp eq i8 %a, %b
275-
; CHECK-NEXT: [[OR:%.*]] = or i1 [[CMP1]], [[CMP2]]
276-
; CHECK-NEXT: ret i1 [[OR]]
236+
; CHECK-NEXT: ret i1 [[CMP1]]
277237
;
278238
%cmp1 = icmp sge i8 %a, %b
279239
%cmp2 = icmp eq i8 %a, %b
@@ -283,10 +243,7 @@ define i1 @sge_eq(i8 %a, i8 %b) {
283243

284244
define i1 @sge_ne(i8 %a, i8 %b) {
285245
; CHECK-LABEL: @sge_ne(
286-
; CHECK-NEXT: [[CMP1:%.*]] = icmp sge i8 %a, %b
287-
; CHECK-NEXT: [[CMP2:%.*]] = icmp ne i8 %a, %b
288-
; CHECK-NEXT: [[OR:%.*]] = or i1 [[CMP1]], [[CMP2]]
289-
; CHECK-NEXT: ret i1 [[OR]]
246+
; CHECK-NEXT: ret i1 true
290247
;
291248
%cmp1 = icmp sge i8 %a, %b
292249
%cmp2 = icmp ne i8 %a, %b
@@ -296,10 +253,8 @@ define i1 @sge_ne(i8 %a, i8 %b) {
296253

297254
define i1 @sge_sge(i8 %a, i8 %b) {
298255
; CHECK-LABEL: @sge_sge(
299-
; CHECK-NEXT: [[CMP1:%.*]] = icmp sge i8 %a, %b
300256
; CHECK-NEXT: [[CMP2:%.*]] = icmp sge i8 %a, %b
301-
; CHECK-NEXT: [[OR:%.*]] = or i1 [[CMP1]], [[CMP2]]
302-
; CHECK-NEXT: ret i1 [[OR]]
257+
; CHECK-NEXT: ret i1 [[CMP2]]
303258
;
304259
%cmp1 = icmp sge i8 %a, %b
305260
%cmp2 = icmp sge i8 %a, %b
@@ -310,9 +265,7 @@ define i1 @sge_sge(i8 %a, i8 %b) {
310265
define i1 @sge_sgt(i8 %a, i8 %b) {
311266
; CHECK-LABEL: @sge_sgt(
312267
; CHECK-NEXT: [[CMP1:%.*]] = icmp sge i8 %a, %b
313-
; CHECK-NEXT: [[CMP2:%.*]] = icmp sgt i8 %a, %b
314-
; CHECK-NEXT: [[OR:%.*]] = or i1 [[CMP1]], [[CMP2]]
315-
; CHECK-NEXT: ret i1 [[OR]]
268+
; CHECK-NEXT: ret i1 [[CMP1]]
316269
;
317270
%cmp1 = icmp sge i8 %a, %b
318271
%cmp2 = icmp sgt i8 %a, %b
@@ -322,10 +275,7 @@ define i1 @sge_sgt(i8 %a, i8 %b) {
322275

323276
define i1 @sge_sle(i8 %a, i8 %b) {
324277
; CHECK-LABEL: @sge_sle(
325-
; CHECK-NEXT: [[CMP1:%.*]] = icmp sge i8 %a, %b
326-
; CHECK-NEXT: [[CMP2:%.*]] = icmp sle i8 %a, %b
327-
; CHECK-NEXT: [[OR:%.*]] = or i1 [[CMP1]], [[CMP2]]
328-
; CHECK-NEXT: ret i1 [[OR]]
278+
; CHECK-NEXT: ret i1 true
329279
;
330280
%cmp1 = icmp sge i8 %a, %b
331281
%cmp2 = icmp sle i8 %a, %b
@@ -335,10 +285,7 @@ define i1 @sge_sle(i8 %a, i8 %b) {
335285

336286
define i1 @sge_slt(i8 %a, i8 %b) {
337287
; CHECK-LABEL: @sge_slt(
338-
; CHECK-NEXT: [[CMP1:%.*]] = icmp sge i8 %a, %b
339-
; CHECK-NEXT: [[CMP2:%.*]] = icmp slt i8 %a, %b
340-
; CHECK-NEXT: [[OR:%.*]] = or i1 [[CMP1]], [[CMP2]]
341-
; CHECK-NEXT: ret i1 [[OR]]
288+
; CHECK-NEXT: ret i1 true
342289
;
343290
%cmp1 = icmp sge i8 %a, %b
344291
%cmp2 = icmp slt i8 %a, %b
@@ -415,10 +362,8 @@ define i1 @sgt_eq(i8 %a, i8 %b) {
415362

416363
define i1 @sgt_ne(i8 %a, i8 %b) {
417364
; CHECK-LABEL: @sgt_ne(
418-
; CHECK-NEXT: [[CMP1:%.*]] = icmp sgt i8 %a, %b
419365
; CHECK-NEXT: [[CMP2:%.*]] = icmp ne i8 %a, %b
420-
; CHECK-NEXT: [[OR:%.*]] = or i1 [[CMP1]], [[CMP2]]
421-
; CHECK-NEXT: ret i1 [[OR]]
366+
; CHECK-NEXT: ret i1 [[CMP2]]
422367
;
423368
%cmp1 = icmp sgt i8 %a, %b
424369
%cmp2 = icmp ne i8 %a, %b
@@ -428,10 +373,8 @@ define i1 @sgt_ne(i8 %a, i8 %b) {
428373

429374
define i1 @sgt_sge(i8 %a, i8 %b) {
430375
; CHECK-LABEL: @sgt_sge(
431-
; CHECK-NEXT: [[CMP1:%.*]] = icmp sgt i8 %a, %b
432376
; CHECK-NEXT: [[CMP2:%.*]] = icmp sge i8 %a, %b
433-
; CHECK-NEXT: [[OR:%.*]] = or i1 [[CMP1]], [[CMP2]]
434-
; CHECK-NEXT: ret i1 [[OR]]
377+
; CHECK-NEXT: ret i1 [[CMP2]]
435378
;
436379
%cmp1 = icmp sgt i8 %a, %b
437380
%cmp2 = icmp sge i8 %a, %b
@@ -441,10 +384,8 @@ define i1 @sgt_sge(i8 %a, i8 %b) {
441384

442385
define i1 @sgt_sgt(i8 %a, i8 %b) {
443386
; CHECK-LABEL: @sgt_sgt(
444-
; CHECK-NEXT: [[CMP1:%.*]] = icmp sgt i8 %a, %b
445387
; CHECK-NEXT: [[CMP2:%.*]] = icmp sgt i8 %a, %b
446-
; CHECK-NEXT: [[OR:%.*]] = or i1 [[CMP1]], [[CMP2]]
447-
; CHECK-NEXT: ret i1 [[OR]]
388+
; CHECK-NEXT: ret i1 [[CMP2]]
448389
;
449390
%cmp1 = icmp sgt i8 %a, %b
450391
%cmp2 = icmp sgt i8 %a, %b
@@ -454,10 +395,7 @@ define i1 @sgt_sgt(i8 %a, i8 %b) {
454395

455396
define i1 @sgt_sle(i8 %a, i8 %b) {
456397
; CHECK-LABEL: @sgt_sle(
457-
; CHECK-NEXT: [[CMP1:%.*]] = icmp sgt i8 %a, %b
458-
; CHECK-NEXT: [[CMP2:%.*]] = icmp sle i8 %a, %b
459-
; CHECK-NEXT: [[OR:%.*]] = or i1 [[CMP1]], [[CMP2]]
460-
; CHECK-NEXT: ret i1 [[OR]]
398+
; CHECK-NEXT: ret i1 true
461399
;
462400
%cmp1 = icmp sgt i8 %a, %b
463401
%cmp2 = icmp sle i8 %a, %b
@@ -535,9 +473,7 @@ define i1 @sgt_ult(i8 %a, i8 %b) {
535473
define i1 @sle_eq(i8 %a, i8 %b) {
536474
; CHECK-LABEL: @sle_eq(
537475
; CHECK-NEXT: [[CMP1:%.*]] = icmp sle i8 %a, %b
538-
; CHECK-NEXT: [[CMP2:%.*]] = icmp eq i8 %a, %b
539-
; CHECK-NEXT: [[OR:%.*]] = or i1 [[CMP1]], [[CMP2]]
540-
; CHECK-NEXT: ret i1 [[OR]]
476+
; CHECK-NEXT: ret i1 [[CMP1]]
541477
;
542478
%cmp1 = icmp sle i8 %a, %b
543479
%cmp2 = icmp eq i8 %a, %b
@@ -547,10 +483,7 @@ define i1 @sle_eq(i8 %a, i8 %b) {
547483

548484
define i1 @sle_ne(i8 %a, i8 %b) {
549485
; CHECK-LABEL: @sle_ne(
550-
; CHECK-NEXT: [[CMP1:%.*]] = icmp sle i8 %a, %b
551-
; CHECK-NEXT: [[CMP2:%.*]] = icmp ne i8 %a, %b
552-
; CHECK-NEXT: [[OR:%.*]] = or i1 [[CMP1]], [[CMP2]]
553-
; CHECK-NEXT: ret i1 [[OR]]
486+
; CHECK-NEXT: ret i1 true
554487
;
555488
%cmp1 = icmp sle i8 %a, %b
556489
%cmp2 = icmp ne i8 %a, %b
@@ -560,10 +493,7 @@ define i1 @sle_ne(i8 %a, i8 %b) {
560493

561494
define i1 @sle_sge(i8 %a, i8 %b) {
562495
; CHECK-LABEL: @sle_sge(
563-
; CHECK-NEXT: [[CMP1:%.*]] = icmp sle i8 %a, %b
564-
; CHECK-NEXT: [[CMP2:%.*]] = icmp sge i8 %a, %b
565-
; CHECK-NEXT: [[OR:%.*]] = or i1 [[CMP1]], [[CMP2]]
566-
; CHECK-NEXT: ret i1 [[OR]]
496+
; CHECK-NEXT: ret i1 true
567497
;
568498
%cmp1 = icmp sle i8 %a, %b
569499
%cmp2 = icmp sge i8 %a, %b
@@ -573,10 +503,7 @@ define i1 @sle_sge(i8 %a, i8 %b) {
573503

574504
define i1 @sle_sgt(i8 %a, i8 %b) {
575505
; CHECK-LABEL: @sle_sgt(
576-
; CHECK-NEXT: [[CMP1:%.*]] = icmp sle i8 %a, %b
577-
; CHECK-NEXT: [[CMP2:%.*]] = icmp sgt i8 %a, %b
578-
; CHECK-NEXT: [[OR:%.*]] = or i1 [[CMP1]], [[CMP2]]
579-
; CHECK-NEXT: ret i1 [[OR]]
506+
; CHECK-NEXT: ret i1 true
580507
;
581508
%cmp1 = icmp sle i8 %a, %b
582509
%cmp2 = icmp sgt i8 %a, %b
@@ -586,10 +513,8 @@ define i1 @sle_sgt(i8 %a, i8 %b) {
586513

587514
define i1 @sle_sle(i8 %a, i8 %b) {
588515
; CHECK-LABEL: @sle_sle(
589-
; CHECK-NEXT: [[CMP1:%.*]] = icmp sle i8 %a, %b
590516
; CHECK-NEXT: [[CMP2:%.*]] = icmp sle i8 %a, %b
591-
; CHECK-NEXT: [[OR:%.*]] = or i1 [[CMP1]], [[CMP2]]
592-
; CHECK-NEXT: ret i1 [[OR]]
517+
; CHECK-NEXT: ret i1 [[CMP2]]
593518
;
594519
%cmp1 = icmp sle i8 %a, %b
595520
%cmp2 = icmp sle i8 %a, %b
@@ -600,9 +525,7 @@ define i1 @sle_sle(i8 %a, i8 %b) {
600525
define i1 @sle_slt(i8 %a, i8 %b) {
601526
; CHECK-LABEL: @sle_slt(
602527
; CHECK-NEXT: [[CMP1:%.*]] = icmp sle i8 %a, %b
603-
; CHECK-NEXT: [[CMP2:%.*]] = icmp slt i8 %a, %b
604-
; CHECK-NEXT: [[OR:%.*]] = or i1 [[CMP1]], [[CMP2]]
605-
; CHECK-NEXT: ret i1 [[OR]]
528+
; CHECK-NEXT: ret i1 [[CMP1]]
606529
;
607530
%cmp1 = icmp sle i8 %a, %b
608531
%cmp2 = icmp slt i8 %a, %b
@@ -679,10 +602,8 @@ define i1 @slt_eq(i8 %a, i8 %b) {
679602

680603
define i1 @slt_ne(i8 %a, i8 %b) {
681604
; CHECK-LABEL: @slt_ne(
682-
; CHECK-NEXT: [[CMP1:%.*]] = icmp slt i8 %a, %b
683605
; CHECK-NEXT: [[CMP2:%.*]] = icmp ne i8 %a, %b
684-
; CHECK-NEXT: [[OR:%.*]] = or i1 [[CMP1]], [[CMP2]]
685-
; CHECK-NEXT: ret i1 [[OR]]
606+
; CHECK-NEXT: ret i1 [[CMP2]]
686607
;
687608
%cmp1 = icmp slt i8 %a, %b
688609
%cmp2 = icmp ne i8 %a, %b
@@ -692,10 +613,7 @@ define i1 @slt_ne(i8 %a, i8 %b) {
692613

693614
define i1 @slt_sge(i8 %a, i8 %b) {
694615
; CHECK-LABEL: @slt_sge(
695-
; CHECK-NEXT: [[CMP1:%.*]] = icmp slt i8 %a, %b
696-
; CHECK-NEXT: [[CMP2:%.*]] = icmp sge i8 %a, %b
697-
; CHECK-NEXT: [[OR:%.*]] = or i1 [[CMP1]], [[CMP2]]
698-
; CHECK-NEXT: ret i1 [[OR]]
616+
; CHECK-NEXT: ret i1 true
699617
;
700618
%cmp1 = icmp slt i8 %a, %b
701619
%cmp2 = icmp sge i8 %a, %b
@@ -718,10 +636,8 @@ define i1 @slt_sgt(i8 %a, i8 %b) {
718636

719637
define i1 @slt_sle(i8 %a, i8 %b) {
720638
; CHECK-LABEL: @slt_sle(
721-
; CHECK-NEXT: [[CMP1:%.*]] = icmp slt i8 %a, %b
722639
; CHECK-NEXT: [[CMP2:%.*]] = icmp sle i8 %a, %b
723-
; CHECK-NEXT: [[OR:%.*]] = or i1 [[CMP1]], [[CMP2]]
724-
; CHECK-NEXT: ret i1 [[OR]]
640+
; CHECK-NEXT: ret i1 [[CMP2]]
725641
;
726642
%cmp1 = icmp slt i8 %a, %b
727643
%cmp2 = icmp sle i8 %a, %b
@@ -731,10 +647,8 @@ define i1 @slt_sle(i8 %a, i8 %b) {
731647

732648
define i1 @slt_slt(i8 %a, i8 %b) {
733649
; CHECK-LABEL: @slt_slt(
734-
; CHECK-NEXT: [[CMP1:%.*]] = icmp slt i8 %a, %b
735650
; CHECK-NEXT: [[CMP2:%.*]] = icmp slt i8 %a, %b
736-
; CHECK-NEXT: [[OR:%.*]] = or i1 [[CMP1]], [[CMP2]]
737-
; CHECK-NEXT: ret i1 [[OR]]
651+
; CHECK-NEXT: ret i1 [[CMP2]]
738652
;
739653
%cmp1 = icmp slt i8 %a, %b
740654
%cmp2 = icmp slt i8 %a, %b
@@ -799,9 +713,7 @@ define i1 @slt_ult(i8 %a, i8 %b) {
799713
define i1 @uge_eq(i8 %a, i8 %b) {
800714
; CHECK-LABEL: @uge_eq(
801715
; CHECK-NEXT: [[CMP1:%.*]] = icmp uge i8 %a, %b
802-
; CHECK-NEXT: [[CMP2:%.*]] = icmp eq i8 %a, %b
803-
; CHECK-NEXT: [[OR:%.*]] = or i1 [[CMP1]], [[CMP2]]
804-
; CHECK-NEXT: ret i1 [[OR]]
716+
; CHECK-NEXT: ret i1 [[CMP1]]
805717
;
806718
%cmp1 = icmp uge i8 %a, %b
807719
%cmp2 = icmp eq i8 %a, %b
@@ -811,10 +723,7 @@ define i1 @uge_eq(i8 %a, i8 %b) {
811723

812724
define i1 @uge_ne(i8 %a, i8 %b) {
813725
; CHECK-LABEL: @uge_ne(
814-
; CHECK-NEXT: [[CMP1:%.*]] = icmp uge i8 %a, %b
815-
; CHECK-NEXT: [[CMP2:%.*]] = icmp ne i8 %a, %b
816-
; CHECK-NEXT: [[OR:%.*]] = or i1 [[CMP1]], [[CMP2]]
817-
; CHECK-NEXT: ret i1 [[OR]]
726+
; CHECK-NEXT: ret i1 true
818727
;
819728
%cmp1 = icmp uge i8 %a, %b
820729
%cmp2 = icmp ne i8 %a, %b
@@ -876,10 +785,8 @@ define i1 @uge_slt(i8 %a, i8 %b) {
876785

877786
define i1 @uge_uge(i8 %a, i8 %b) {
878787
; CHECK-LABEL: @uge_uge(
879-
; CHECK-NEXT: [[CMP1:%.*]] = icmp uge i8 %a, %b
880788
; CHECK-NEXT: [[CMP2:%.*]] = icmp uge i8 %a, %b
881-
; CHECK-NEXT: [[OR:%.*]] = or i1 [[CMP1]], [[CMP2]]
882-
; CHECK-NEXT: ret i1 [[OR]]
789+
; CHECK-NEXT: ret i1 [[CMP2]]
883790
;
884791
%cmp1 = icmp uge i8 %a, %b
885792
%cmp2 = icmp uge i8 %a, %b
@@ -890,9 +797,7 @@ define i1 @uge_uge(i8 %a, i8 %b) {
890797
define i1 @uge_ugt(i8 %a, i8 %b) {
891798
; CHECK-LABEL: @uge_ugt(
892799
; CHECK-NEXT: [[CMP1:%.*]] = icmp uge i8 %a, %b
893-
; CHECK-NEXT: [[CMP2:%.*]] = icmp ugt i8 %a, %b
894-
; CHECK-NEXT: [[OR:%.*]] = or i1 [[CMP1]], [[CMP2]]
895-
; CHECK-NEXT: ret i1 [[OR]]
800+
; CHECK-NEXT: ret i1 [[CMP1]]
896801
;
897802
%cmp1 = icmp uge i8 %a, %b
898803
%cmp2 = icmp ugt i8 %a, %b
@@ -902,10 +807,7 @@ define i1 @uge_ugt(i8 %a, i8 %b) {
902807

903808
define i1 @uge_ule(i8 %a, i8 %b) {
904809
; CHECK-LABEL: @uge_ule(
905-
; CHECK-NEXT: [[CMP1:%.*]] = icmp uge i8 %a, %b
906-
; CHECK-NEXT: [[CMP2:%.*]] = icmp ule i8 %a, %b
907-
; CHECK-NEXT: [[OR:%.*]] = or i1 [[CMP1]], [[CMP2]]
908-
; CHECK-NEXT: ret i1 [[OR]]
810+
; CHECK-NEXT: ret i1 true
909811
;
910812
%cmp1 = icmp uge i8 %a, %b
911813
%cmp2 = icmp ule i8 %a, %b
@@ -915,10 +817,7 @@ define i1 @uge_ule(i8 %a, i8 %b) {
915817

916818
define i1 @uge_ult(i8 %a, i8 %b) {
917819
; CHECK-LABEL: @uge_ult(
918-
; CHECK-NEXT: [[CMP1:%.*]] = icmp uge i8 %a, %b
919-
; CHECK-NEXT: [[CMP2:%.*]] = icmp ult i8 %a, %b
920-
; CHECK-NEXT: [[OR:%.*]] = or i1 [[CMP1]], [[CMP2]]
921-
; CHECK-NEXT: ret i1 [[OR]]
820+
; CHECK-NEXT: ret i1 true
922821
;
923822
%cmp1 = icmp uge i8 %a, %b
924823
%cmp2 = icmp ult i8 %a, %b
@@ -943,10 +842,8 @@ define i1 @ugt_eq(i8 %a, i8 %b) {
943842

944843
define i1 @ugt_ne(i8 %a, i8 %b) {
945844
; CHECK-LABEL: @ugt_ne(
946-
; CHECK-NEXT: [[CMP1:%.*]] = icmp ugt i8 %a, %b
947845
; CHECK-NEXT: [[CMP2:%.*]] = icmp ne i8 %a, %b
948-
; CHECK-NEXT: [[OR:%.*]] = or i1 [[CMP1]], [[CMP2]]
949-
; CHECK-NEXT: ret i1 [[OR]]
846+
; CHECK-NEXT: ret i1 [[CMP2]]
950847
;
951848
%cmp1 = icmp ugt i8 %a, %b
952849
%cmp2 = icmp ne i8 %a, %b
@@ -1008,10 +905,8 @@ define i1 @ugt_slt(i8 %a, i8 %b) {
1008905

1009906
define i1 @ugt_uge(i8 %a, i8 %b) {
1010907
; CHECK-LABEL: @ugt_uge(
1011-
; CHECK-NEXT: [[CMP1:%.*]] = icmp ugt i8 %a, %b
1012908
; CHECK-NEXT: [[CMP2:%.*]] = icmp uge i8 %a, %b
1013-
; CHECK-NEXT: [[OR:%.*]] = or i1 [[CMP1]], [[CMP2]]
1014-
; CHECK-NEXT: ret i1 [[OR]]
909+
; CHECK-NEXT: ret i1 [[CMP2]]
1015910
;
1016911
%cmp1 = icmp ugt i8 %a, %b
1017912
%cmp2 = icmp uge i8 %a, %b
@@ -1021,10 +916,8 @@ define i1 @ugt_uge(i8 %a, i8 %b) {
1021916

1022917
define i1 @ugt_ugt(i8 %a, i8 %b) {
1023918
; CHECK-LABEL: @ugt_ugt(
1024-
; CHECK-NEXT: [[CMP1:%.*]] = icmp ugt i8 %a, %b
1025919
; CHECK-NEXT: [[CMP2:%.*]] = icmp ugt i8 %a, %b
1026-
; CHECK-NEXT: [[OR:%.*]] = or i1 [[CMP1]], [[CMP2]]
1027-
; CHECK-NEXT: ret i1 [[OR]]
920+
; CHECK-NEXT: ret i1 [[CMP2]]
1028921
;
1029922
%cmp1 = icmp ugt i8 %a, %b
1030923
%cmp2 = icmp ugt i8 %a, %b
@@ -1034,10 +927,7 @@ define i1 @ugt_ugt(i8 %a, i8 %b) {
1034927

1035928
define i1 @ugt_ule(i8 %a, i8 %b) {
1036929
; CHECK-LABEL: @ugt_ule(
1037-
; CHECK-NEXT: [[CMP1:%.*]] = icmp ugt i8 %a, %b
1038-
; CHECK-NEXT: [[CMP2:%.*]] = icmp ule i8 %a, %b
1039-
; CHECK-NEXT: [[OR:%.*]] = or i1 [[CMP1]], [[CMP2]]
1040-
; CHECK-NEXT: ret i1 [[OR]]
930+
; CHECK-NEXT: ret i1 true
1041931
;
1042932
%cmp1 = icmp ugt i8 %a, %b
1043933
%cmp2 = icmp ule i8 %a, %b
@@ -1063,9 +953,7 @@ define i1 @ugt_ult(i8 %a, i8 %b) {
1063953
define i1 @ule_eq(i8 %a, i8 %b) {
1064954
; CHECK-LABEL: @ule_eq(
1065955
; CHECK-NEXT: [[CMP1:%.*]] = icmp ule i8 %a, %b
1066-
; CHECK-NEXT: [[CMP2:%.*]] = icmp eq i8 %a, %b
1067-
; CHECK-NEXT: [[OR:%.*]] = or i1 [[CMP1]], [[CMP2]]
1068-
; CHECK-NEXT: ret i1 [[OR]]
956+
; CHECK-NEXT: ret i1 [[CMP1]]
1069957
;
1070958
%cmp1 = icmp ule i8 %a, %b
1071959
%cmp2 = icmp eq i8 %a, %b
@@ -1075,10 +963,7 @@ define i1 @ule_eq(i8 %a, i8 %b) {
1075963

1076964
define i1 @ule_ne(i8 %a, i8 %b) {
1077965
; CHECK-LABEL: @ule_ne(
1078-
; CHECK-NEXT: [[CMP1:%.*]] = icmp ule i8 %a, %b
1079-
; CHECK-NEXT: [[CMP2:%.*]] = icmp ne i8 %a, %b
1080-
; CHECK-NEXT: [[OR:%.*]] = or i1 [[CMP1]], [[CMP2]]
1081-
; CHECK-NEXT: ret i1 [[OR]]
966+
; CHECK-NEXT: ret i1 true
1082967
;
1083968
%cmp1 = icmp ule i8 %a, %b
1084969
%cmp2 = icmp ne i8 %a, %b
@@ -1140,10 +1025,7 @@ define i1 @ule_slt(i8 %a, i8 %b) {
11401025

11411026
define i1 @ule_uge(i8 %a, i8 %b) {
11421027
; CHECK-LABEL: @ule_uge(
1143-
; CHECK-NEXT: [[CMP1:%.*]] = icmp ule i8 %a, %b
1144-
; CHECK-NEXT: [[CMP2:%.*]] = icmp uge i8 %a, %b
1145-
; CHECK-NEXT: [[OR:%.*]] = or i1 [[CMP1]], [[CMP2]]
1146-
; CHECK-NEXT: ret i1 [[OR]]
1028+
; CHECK-NEXT: ret i1 true
11471029
;
11481030
%cmp1 = icmp ule i8 %a, %b
11491031
%cmp2 = icmp uge i8 %a, %b
@@ -1153,10 +1035,7 @@ define i1 @ule_uge(i8 %a, i8 %b) {
11531035

11541036
define i1 @ule_ugt(i8 %a, i8 %b) {
11551037
; CHECK-LABEL: @ule_ugt(
1156-
; CHECK-NEXT: [[CMP1:%.*]] = icmp ule i8 %a, %b
1157-
; CHECK-NEXT: [[CMP2:%.*]] = icmp ugt i8 %a, %b
1158-
; CHECK-NEXT: [[OR:%.*]] = or i1 [[CMP1]], [[CMP2]]
1159-
; CHECK-NEXT: ret i1 [[OR]]
1038+
; CHECK-NEXT: ret i1 true
11601039
;
11611040
%cmp1 = icmp ule i8 %a, %b
11621041
%cmp2 = icmp ugt i8 %a, %b
@@ -1166,10 +1045,8 @@ define i1 @ule_ugt(i8 %a, i8 %b) {
11661045

11671046
define i1 @ule_ule(i8 %a, i8 %b) {
11681047
; CHECK-LABEL: @ule_ule(
1169-
; CHECK-NEXT: [[CMP1:%.*]] = icmp ule i8 %a, %b
11701048
; CHECK-NEXT: [[CMP2:%.*]] = icmp ule i8 %a, %b
1171-
; CHECK-NEXT: [[OR:%.*]] = or i1 [[CMP1]], [[CMP2]]
1172-
; CHECK-NEXT: ret i1 [[OR]]
1049+
; CHECK-NEXT: ret i1 [[CMP2]]
11731050
;
11741051
%cmp1 = icmp ule i8 %a, %b
11751052
%cmp2 = icmp ule i8 %a, %b
@@ -1180,9 +1057,7 @@ define i1 @ule_ule(i8 %a, i8 %b) {
11801057
define i1 @ule_ult(i8 %a, i8 %b) {
11811058
; CHECK-LABEL: @ule_ult(
11821059
; CHECK-NEXT: [[CMP1:%.*]] = icmp ule i8 %a, %b
1183-
; CHECK-NEXT: [[CMP2:%.*]] = icmp ult i8 %a, %b
1184-
; CHECK-NEXT: [[OR:%.*]] = or i1 [[CMP1]], [[CMP2]]
1185-
; CHECK-NEXT: ret i1 [[OR]]
1060+
; CHECK-NEXT: ret i1 [[CMP1]]
11861061
;
11871062
%cmp1 = icmp ule i8 %a, %b
11881063
%cmp2 = icmp ult i8 %a, %b
@@ -1207,10 +1082,8 @@ define i1 @ult_eq(i8 %a, i8 %b) {
12071082

12081083
define i1 @ult_ne(i8 %a, i8 %b) {
12091084
; CHECK-LABEL: @ult_ne(
1210-
; CHECK-NEXT: [[CMP1:%.*]] = icmp ult i8 %a, %b
12111085
; CHECK-NEXT: [[CMP2:%.*]] = icmp ne i8 %a, %b
1212-
; CHECK-NEXT: [[OR:%.*]] = or i1 [[CMP1]], [[CMP2]]
1213-
; CHECK-NEXT: ret i1 [[OR]]
1086+
; CHECK-NEXT: ret i1 [[CMP2]]
12141087
;
12151088
%cmp1 = icmp ult i8 %a, %b
12161089
%cmp2 = icmp ne i8 %a, %b
@@ -1272,10 +1145,7 @@ define i1 @ult_slt(i8 %a, i8 %b) {
12721145

12731146
define i1 @ult_uge(i8 %a, i8 %b) {
12741147
; CHECK-LABEL: @ult_uge(
1275-
; CHECK-NEXT: [[CMP1:%.*]] = icmp ult i8 %a, %b
1276-
; CHECK-NEXT: [[CMP2:%.*]] = icmp uge i8 %a, %b
1277-
; CHECK-NEXT: [[OR:%.*]] = or i1 [[CMP1]], [[CMP2]]
1278-
; CHECK-NEXT: ret i1 [[OR]]
1148+
; CHECK-NEXT: ret i1 true
12791149
;
12801150
%cmp1 = icmp ult i8 %a, %b
12811151
%cmp2 = icmp uge i8 %a, %b
@@ -1298,10 +1168,8 @@ define i1 @ult_ugt(i8 %a, i8 %b) {
12981168

12991169
define i1 @ult_ule(i8 %a, i8 %b) {
13001170
; CHECK-LABEL: @ult_ule(
1301-
; CHECK-NEXT: [[CMP1:%.*]] = icmp ult i8 %a, %b
13021171
; CHECK-NEXT: [[CMP2:%.*]] = icmp ule i8 %a, %b
1303-
; CHECK-NEXT: [[OR:%.*]] = or i1 [[CMP1]], [[CMP2]]
1304-
; CHECK-NEXT: ret i1 [[OR]]
1172+
; CHECK-NEXT: ret i1 [[CMP2]]
13051173
;
13061174
%cmp1 = icmp ult i8 %a, %b
13071175
%cmp2 = icmp ule i8 %a, %b
@@ -1311,10 +1179,8 @@ define i1 @ult_ule(i8 %a, i8 %b) {
13111179

13121180
define i1 @ult_ult(i8 %a, i8 %b) {
13131181
; CHECK-LABEL: @ult_ult(
1314-
; CHECK-NEXT: [[CMP1:%.*]] = icmp ult i8 %a, %b
13151182
; CHECK-NEXT: [[CMP2:%.*]] = icmp ult i8 %a, %b
1316-
; CHECK-NEXT: [[OR:%.*]] = or i1 [[CMP1]], [[CMP2]]
1317-
; CHECK-NEXT: ret i1 [[OR]]
1183+
; CHECK-NEXT: ret i1 [[CMP2]]
13181184
;
13191185
%cmp1 = icmp ult i8 %a, %b
13201186
%cmp2 = icmp ult i8 %a, %b
@@ -1326,10 +1192,7 @@ define i1 @ult_ult(i8 %a, i8 %b) {
13261192

13271193
define <2 x i1> @ult_uge_vec(<2 x i8> %a, <2 x i8> %b) {
13281194
; CHECK-LABEL: @ult_uge_vec(
1329-
; CHECK-NEXT: [[CMP1:%.*]] = icmp ult <2 x i8> %a, %b
1330-
; CHECK-NEXT: [[CMP2:%.*]] = icmp uge <2 x i8> %a, %b
1331-
; CHECK-NEXT: [[OR:%.*]] = or <2 x i1> [[CMP1]], [[CMP2]]
1332-
; CHECK-NEXT: ret <2 x i1> [[OR]]
1195+
; CHECK-NEXT: ret <2 x i1> <i1 true, i1 true>
13331196
;
13341197
%cmp1 = icmp ult <2 x i8> %a, %b
13351198
%cmp2 = icmp uge <2 x i8> %a, %b
@@ -1339,10 +1202,8 @@ define <2 x i1> @ult_uge_vec(<2 x i8> %a, <2 x i8> %b) {
13391202

13401203
define <2 x i1> @ult_ule_vec(<2 x i8> %a, <2 x i8> %b) {
13411204
; CHECK-LABEL: @ult_ule_vec(
1342-
; CHECK-NEXT: [[CMP1:%.*]] = icmp ult <2 x i8> %a, %b
13431205
; CHECK-NEXT: [[CMP2:%.*]] = icmp ule <2 x i8> %a, %b
1344-
; CHECK-NEXT: [[OR:%.*]] = or <2 x i1> [[CMP1]], [[CMP2]]
1345-
; CHECK-NEXT: ret <2 x i1> [[OR]]
1206+
; CHECK-NEXT: ret <2 x i1> [[CMP2]]
13461207
;
13471208
%cmp1 = icmp ult <2 x i8> %a, %b
13481209
%cmp2 = icmp ule <2 x i8> %a, %b

0 commit comments

Comments
 (0)
Please sign in to comment.