2
2
; RUN: opt < %s -instsimplify -S | FileCheck %s
3
3
4
4
; 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.
6
6
7
7
define i1 @eq_eq (i8 %a , i8 %b ) {
8
8
; CHECK-LABEL: @eq_eq(
9
- ; CHECK-NEXT: [[CMP1:%.*]] = icmp eq i8 %a, %b
10
9
; 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]]
13
11
;
14
12
%cmp1 = icmp eq i8 %a , %b
15
13
%cmp2 = icmp eq i8 %a , %b
@@ -19,10 +17,7 @@ define i1 @eq_eq(i8 %a, i8 %b) {
19
17
20
18
define i1 @eq_ne (i8 %a , i8 %b ) {
21
19
; 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
26
21
;
27
22
%cmp1 = icmp eq i8 %a , %b
28
23
%cmp2 = icmp ne i8 %a , %b
@@ -32,10 +27,8 @@ define i1 @eq_ne(i8 %a, i8 %b) {
32
27
33
28
define i1 @eq_sge (i8 %a , i8 %b ) {
34
29
; CHECK-LABEL: @eq_sge(
35
- ; CHECK-NEXT: [[CMP1:%.*]] = icmp eq i8 %a, %b
36
30
; 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]]
39
32
;
40
33
%cmp1 = icmp eq i8 %a , %b
41
34
%cmp2 = icmp sge i8 %a , %b
@@ -58,10 +51,8 @@ define i1 @eq_sgt(i8 %a, i8 %b) {
58
51
59
52
define i1 @eq_sle (i8 %a , i8 %b ) {
60
53
; CHECK-LABEL: @eq_sle(
61
- ; CHECK-NEXT: [[CMP1:%.*]] = icmp eq i8 %a, %b
62
54
; 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]]
65
56
;
66
57
%cmp1 = icmp eq i8 %a , %b
67
58
%cmp2 = icmp sle i8 %a , %b
@@ -84,10 +75,8 @@ define i1 @eq_slt(i8 %a, i8 %b) {
84
75
85
76
define i1 @eq_uge (i8 %a , i8 %b ) {
86
77
; CHECK-LABEL: @eq_uge(
87
- ; CHECK-NEXT: [[CMP1:%.*]] = icmp eq i8 %a, %b
88
78
; 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]]
91
80
;
92
81
%cmp1 = icmp eq i8 %a , %b
93
82
%cmp2 = icmp uge i8 %a , %b
@@ -110,10 +99,8 @@ define i1 @eq_ugt(i8 %a, i8 %b) {
110
99
111
100
define i1 @eq_ule (i8 %a , i8 %b ) {
112
101
; CHECK-LABEL: @eq_ule(
113
- ; CHECK-NEXT: [[CMP1:%.*]] = icmp eq i8 %a, %b
114
102
; 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]]
117
104
;
118
105
%cmp1 = icmp eq i8 %a , %b
119
106
%cmp2 = icmp ule i8 %a , %b
@@ -138,10 +125,7 @@ define i1 @eq_ult(i8 %a, i8 %b) {
138
125
139
126
define i1 @ne_eq (i8 %a , i8 %b ) {
140
127
; 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
145
129
;
146
130
%cmp1 = icmp ne i8 %a , %b
147
131
%cmp2 = icmp eq i8 %a , %b
@@ -151,10 +135,8 @@ define i1 @ne_eq(i8 %a, i8 %b) {
151
135
152
136
define i1 @ne_ne (i8 %a , i8 %b ) {
153
137
; CHECK-LABEL: @ne_ne(
154
- ; CHECK-NEXT: [[CMP1:%.*]] = icmp ne i8 %a, %b
155
138
; 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]]
158
140
;
159
141
%cmp1 = icmp ne i8 %a , %b
160
142
%cmp2 = icmp ne i8 %a , %b
@@ -164,10 +146,7 @@ define i1 @ne_ne(i8 %a, i8 %b) {
164
146
165
147
define i1 @ne_sge (i8 %a , i8 %b ) {
166
148
; 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
171
150
;
172
151
%cmp1 = icmp ne i8 %a , %b
173
152
%cmp2 = icmp sge i8 %a , %b
@@ -178,9 +157,7 @@ define i1 @ne_sge(i8 %a, i8 %b) {
178
157
define i1 @ne_sgt (i8 %a , i8 %b ) {
179
158
; CHECK-LABEL: @ne_sgt(
180
159
; 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]]
184
161
;
185
162
%cmp1 = icmp ne i8 %a , %b
186
163
%cmp2 = icmp sgt i8 %a , %b
@@ -190,10 +167,7 @@ define i1 @ne_sgt(i8 %a, i8 %b) {
190
167
191
168
define i1 @ne_sle (i8 %a , i8 %b ) {
192
169
; 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
197
171
;
198
172
%cmp1 = icmp ne i8 %a , %b
199
173
%cmp2 = icmp sle i8 %a , %b
@@ -204,9 +178,7 @@ define i1 @ne_sle(i8 %a, i8 %b) {
204
178
define i1 @ne_slt (i8 %a , i8 %b ) {
205
179
; CHECK-LABEL: @ne_slt(
206
180
; 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]]
210
182
;
211
183
%cmp1 = icmp ne i8 %a , %b
212
184
%cmp2 = icmp slt i8 %a , %b
@@ -216,10 +188,7 @@ define i1 @ne_slt(i8 %a, i8 %b) {
216
188
217
189
define i1 @ne_uge (i8 %a , i8 %b ) {
218
190
; 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
223
192
;
224
193
%cmp1 = icmp ne i8 %a , %b
225
194
%cmp2 = icmp uge i8 %a , %b
@@ -230,9 +199,7 @@ define i1 @ne_uge(i8 %a, i8 %b) {
230
199
define i1 @ne_ugt (i8 %a , i8 %b ) {
231
200
; CHECK-LABEL: @ne_ugt(
232
201
; 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]]
236
203
;
237
204
%cmp1 = icmp ne i8 %a , %b
238
205
%cmp2 = icmp ugt i8 %a , %b
@@ -242,10 +209,7 @@ define i1 @ne_ugt(i8 %a, i8 %b) {
242
209
243
210
define i1 @ne_ule (i8 %a , i8 %b ) {
244
211
; 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
249
213
;
250
214
%cmp1 = icmp ne i8 %a , %b
251
215
%cmp2 = icmp ule i8 %a , %b
@@ -256,9 +220,7 @@ define i1 @ne_ule(i8 %a, i8 %b) {
256
220
define i1 @ne_ult (i8 %a , i8 %b ) {
257
221
; CHECK-LABEL: @ne_ult(
258
222
; 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]]
262
224
;
263
225
%cmp1 = icmp ne i8 %a , %b
264
226
%cmp2 = icmp ult i8 %a , %b
@@ -271,9 +233,7 @@ define i1 @ne_ult(i8 %a, i8 %b) {
271
233
define i1 @sge_eq (i8 %a , i8 %b ) {
272
234
; CHECK-LABEL: @sge_eq(
273
235
; 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]]
277
237
;
278
238
%cmp1 = icmp sge i8 %a , %b
279
239
%cmp2 = icmp eq i8 %a , %b
@@ -283,10 +243,7 @@ define i1 @sge_eq(i8 %a, i8 %b) {
283
243
284
244
define i1 @sge_ne (i8 %a , i8 %b ) {
285
245
; 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
290
247
;
291
248
%cmp1 = icmp sge i8 %a , %b
292
249
%cmp2 = icmp ne i8 %a , %b
@@ -296,10 +253,8 @@ define i1 @sge_ne(i8 %a, i8 %b) {
296
253
297
254
define i1 @sge_sge (i8 %a , i8 %b ) {
298
255
; CHECK-LABEL: @sge_sge(
299
- ; CHECK-NEXT: [[CMP1:%.*]] = icmp sge i8 %a, %b
300
256
; 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]]
303
258
;
304
259
%cmp1 = icmp sge i8 %a , %b
305
260
%cmp2 = icmp sge i8 %a , %b
@@ -310,9 +265,7 @@ define i1 @sge_sge(i8 %a, i8 %b) {
310
265
define i1 @sge_sgt (i8 %a , i8 %b ) {
311
266
; CHECK-LABEL: @sge_sgt(
312
267
; 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]]
316
269
;
317
270
%cmp1 = icmp sge i8 %a , %b
318
271
%cmp2 = icmp sgt i8 %a , %b
@@ -322,10 +275,7 @@ define i1 @sge_sgt(i8 %a, i8 %b) {
322
275
323
276
define i1 @sge_sle (i8 %a , i8 %b ) {
324
277
; 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
329
279
;
330
280
%cmp1 = icmp sge i8 %a , %b
331
281
%cmp2 = icmp sle i8 %a , %b
@@ -335,10 +285,7 @@ define i1 @sge_sle(i8 %a, i8 %b) {
335
285
336
286
define i1 @sge_slt (i8 %a , i8 %b ) {
337
287
; 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
342
289
;
343
290
%cmp1 = icmp sge i8 %a , %b
344
291
%cmp2 = icmp slt i8 %a , %b
@@ -415,10 +362,8 @@ define i1 @sgt_eq(i8 %a, i8 %b) {
415
362
416
363
define i1 @sgt_ne (i8 %a , i8 %b ) {
417
364
; CHECK-LABEL: @sgt_ne(
418
- ; CHECK-NEXT: [[CMP1:%.*]] = icmp sgt i8 %a, %b
419
365
; 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]]
422
367
;
423
368
%cmp1 = icmp sgt i8 %a , %b
424
369
%cmp2 = icmp ne i8 %a , %b
@@ -428,10 +373,8 @@ define i1 @sgt_ne(i8 %a, i8 %b) {
428
373
429
374
define i1 @sgt_sge (i8 %a , i8 %b ) {
430
375
; CHECK-LABEL: @sgt_sge(
431
- ; CHECK-NEXT: [[CMP1:%.*]] = icmp sgt i8 %a, %b
432
376
; 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]]
435
378
;
436
379
%cmp1 = icmp sgt i8 %a , %b
437
380
%cmp2 = icmp sge i8 %a , %b
@@ -441,10 +384,8 @@ define i1 @sgt_sge(i8 %a, i8 %b) {
441
384
442
385
define i1 @sgt_sgt (i8 %a , i8 %b ) {
443
386
; CHECK-LABEL: @sgt_sgt(
444
- ; CHECK-NEXT: [[CMP1:%.*]] = icmp sgt i8 %a, %b
445
387
; 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]]
448
389
;
449
390
%cmp1 = icmp sgt i8 %a , %b
450
391
%cmp2 = icmp sgt i8 %a , %b
@@ -454,10 +395,7 @@ define i1 @sgt_sgt(i8 %a, i8 %b) {
454
395
455
396
define i1 @sgt_sle (i8 %a , i8 %b ) {
456
397
; 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
461
399
;
462
400
%cmp1 = icmp sgt i8 %a , %b
463
401
%cmp2 = icmp sle i8 %a , %b
@@ -535,9 +473,7 @@ define i1 @sgt_ult(i8 %a, i8 %b) {
535
473
define i1 @sle_eq (i8 %a , i8 %b ) {
536
474
; CHECK-LABEL: @sle_eq(
537
475
; 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]]
541
477
;
542
478
%cmp1 = icmp sle i8 %a , %b
543
479
%cmp2 = icmp eq i8 %a , %b
@@ -547,10 +483,7 @@ define i1 @sle_eq(i8 %a, i8 %b) {
547
483
548
484
define i1 @sle_ne (i8 %a , i8 %b ) {
549
485
; 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
554
487
;
555
488
%cmp1 = icmp sle i8 %a , %b
556
489
%cmp2 = icmp ne i8 %a , %b
@@ -560,10 +493,7 @@ define i1 @sle_ne(i8 %a, i8 %b) {
560
493
561
494
define i1 @sle_sge (i8 %a , i8 %b ) {
562
495
; 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
567
497
;
568
498
%cmp1 = icmp sle i8 %a , %b
569
499
%cmp2 = icmp sge i8 %a , %b
@@ -573,10 +503,7 @@ define i1 @sle_sge(i8 %a, i8 %b) {
573
503
574
504
define i1 @sle_sgt (i8 %a , i8 %b ) {
575
505
; 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
580
507
;
581
508
%cmp1 = icmp sle i8 %a , %b
582
509
%cmp2 = icmp sgt i8 %a , %b
@@ -586,10 +513,8 @@ define i1 @sle_sgt(i8 %a, i8 %b) {
586
513
587
514
define i1 @sle_sle (i8 %a , i8 %b ) {
588
515
; CHECK-LABEL: @sle_sle(
589
- ; CHECK-NEXT: [[CMP1:%.*]] = icmp sle i8 %a, %b
590
516
; 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]]
593
518
;
594
519
%cmp1 = icmp sle i8 %a , %b
595
520
%cmp2 = icmp sle i8 %a , %b
@@ -600,9 +525,7 @@ define i1 @sle_sle(i8 %a, i8 %b) {
600
525
define i1 @sle_slt (i8 %a , i8 %b ) {
601
526
; CHECK-LABEL: @sle_slt(
602
527
; 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]]
606
529
;
607
530
%cmp1 = icmp sle i8 %a , %b
608
531
%cmp2 = icmp slt i8 %a , %b
@@ -679,10 +602,8 @@ define i1 @slt_eq(i8 %a, i8 %b) {
679
602
680
603
define i1 @slt_ne (i8 %a , i8 %b ) {
681
604
; CHECK-LABEL: @slt_ne(
682
- ; CHECK-NEXT: [[CMP1:%.*]] = icmp slt i8 %a, %b
683
605
; 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]]
686
607
;
687
608
%cmp1 = icmp slt i8 %a , %b
688
609
%cmp2 = icmp ne i8 %a , %b
@@ -692,10 +613,7 @@ define i1 @slt_ne(i8 %a, i8 %b) {
692
613
693
614
define i1 @slt_sge (i8 %a , i8 %b ) {
694
615
; 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
699
617
;
700
618
%cmp1 = icmp slt i8 %a , %b
701
619
%cmp2 = icmp sge i8 %a , %b
@@ -718,10 +636,8 @@ define i1 @slt_sgt(i8 %a, i8 %b) {
718
636
719
637
define i1 @slt_sle (i8 %a , i8 %b ) {
720
638
; CHECK-LABEL: @slt_sle(
721
- ; CHECK-NEXT: [[CMP1:%.*]] = icmp slt i8 %a, %b
722
639
; 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]]
725
641
;
726
642
%cmp1 = icmp slt i8 %a , %b
727
643
%cmp2 = icmp sle i8 %a , %b
@@ -731,10 +647,8 @@ define i1 @slt_sle(i8 %a, i8 %b) {
731
647
732
648
define i1 @slt_slt (i8 %a , i8 %b ) {
733
649
; CHECK-LABEL: @slt_slt(
734
- ; CHECK-NEXT: [[CMP1:%.*]] = icmp slt i8 %a, %b
735
650
; 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]]
738
652
;
739
653
%cmp1 = icmp slt i8 %a , %b
740
654
%cmp2 = icmp slt i8 %a , %b
@@ -799,9 +713,7 @@ define i1 @slt_ult(i8 %a, i8 %b) {
799
713
define i1 @uge_eq (i8 %a , i8 %b ) {
800
714
; CHECK-LABEL: @uge_eq(
801
715
; 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]]
805
717
;
806
718
%cmp1 = icmp uge i8 %a , %b
807
719
%cmp2 = icmp eq i8 %a , %b
@@ -811,10 +723,7 @@ define i1 @uge_eq(i8 %a, i8 %b) {
811
723
812
724
define i1 @uge_ne (i8 %a , i8 %b ) {
813
725
; 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
818
727
;
819
728
%cmp1 = icmp uge i8 %a , %b
820
729
%cmp2 = icmp ne i8 %a , %b
@@ -876,10 +785,8 @@ define i1 @uge_slt(i8 %a, i8 %b) {
876
785
877
786
define i1 @uge_uge (i8 %a , i8 %b ) {
878
787
; CHECK-LABEL: @uge_uge(
879
- ; CHECK-NEXT: [[CMP1:%.*]] = icmp uge i8 %a, %b
880
788
; 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]]
883
790
;
884
791
%cmp1 = icmp uge i8 %a , %b
885
792
%cmp2 = icmp uge i8 %a , %b
@@ -890,9 +797,7 @@ define i1 @uge_uge(i8 %a, i8 %b) {
890
797
define i1 @uge_ugt (i8 %a , i8 %b ) {
891
798
; CHECK-LABEL: @uge_ugt(
892
799
; 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]]
896
801
;
897
802
%cmp1 = icmp uge i8 %a , %b
898
803
%cmp2 = icmp ugt i8 %a , %b
@@ -902,10 +807,7 @@ define i1 @uge_ugt(i8 %a, i8 %b) {
902
807
903
808
define i1 @uge_ule (i8 %a , i8 %b ) {
904
809
; 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
909
811
;
910
812
%cmp1 = icmp uge i8 %a , %b
911
813
%cmp2 = icmp ule i8 %a , %b
@@ -915,10 +817,7 @@ define i1 @uge_ule(i8 %a, i8 %b) {
915
817
916
818
define i1 @uge_ult (i8 %a , i8 %b ) {
917
819
; 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
922
821
;
923
822
%cmp1 = icmp uge i8 %a , %b
924
823
%cmp2 = icmp ult i8 %a , %b
@@ -943,10 +842,8 @@ define i1 @ugt_eq(i8 %a, i8 %b) {
943
842
944
843
define i1 @ugt_ne (i8 %a , i8 %b ) {
945
844
; CHECK-LABEL: @ugt_ne(
946
- ; CHECK-NEXT: [[CMP1:%.*]] = icmp ugt i8 %a, %b
947
845
; 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]]
950
847
;
951
848
%cmp1 = icmp ugt i8 %a , %b
952
849
%cmp2 = icmp ne i8 %a , %b
@@ -1008,10 +905,8 @@ define i1 @ugt_slt(i8 %a, i8 %b) {
1008
905
1009
906
define i1 @ugt_uge (i8 %a , i8 %b ) {
1010
907
; CHECK-LABEL: @ugt_uge(
1011
- ; CHECK-NEXT: [[CMP1:%.*]] = icmp ugt i8 %a, %b
1012
908
; 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]]
1015
910
;
1016
911
%cmp1 = icmp ugt i8 %a , %b
1017
912
%cmp2 = icmp uge i8 %a , %b
@@ -1021,10 +916,8 @@ define i1 @ugt_uge(i8 %a, i8 %b) {
1021
916
1022
917
define i1 @ugt_ugt (i8 %a , i8 %b ) {
1023
918
; CHECK-LABEL: @ugt_ugt(
1024
- ; CHECK-NEXT: [[CMP1:%.*]] = icmp ugt i8 %a, %b
1025
919
; 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]]
1028
921
;
1029
922
%cmp1 = icmp ugt i8 %a , %b
1030
923
%cmp2 = icmp ugt i8 %a , %b
@@ -1034,10 +927,7 @@ define i1 @ugt_ugt(i8 %a, i8 %b) {
1034
927
1035
928
define i1 @ugt_ule (i8 %a , i8 %b ) {
1036
929
; 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
1041
931
;
1042
932
%cmp1 = icmp ugt i8 %a , %b
1043
933
%cmp2 = icmp ule i8 %a , %b
@@ -1063,9 +953,7 @@ define i1 @ugt_ult(i8 %a, i8 %b) {
1063
953
define i1 @ule_eq (i8 %a , i8 %b ) {
1064
954
; CHECK-LABEL: @ule_eq(
1065
955
; 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]]
1069
957
;
1070
958
%cmp1 = icmp ule i8 %a , %b
1071
959
%cmp2 = icmp eq i8 %a , %b
@@ -1075,10 +963,7 @@ define i1 @ule_eq(i8 %a, i8 %b) {
1075
963
1076
964
define i1 @ule_ne (i8 %a , i8 %b ) {
1077
965
; 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
1082
967
;
1083
968
%cmp1 = icmp ule i8 %a , %b
1084
969
%cmp2 = icmp ne i8 %a , %b
@@ -1140,10 +1025,7 @@ define i1 @ule_slt(i8 %a, i8 %b) {
1140
1025
1141
1026
define i1 @ule_uge (i8 %a , i8 %b ) {
1142
1027
; 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
1147
1029
;
1148
1030
%cmp1 = icmp ule i8 %a , %b
1149
1031
%cmp2 = icmp uge i8 %a , %b
@@ -1153,10 +1035,7 @@ define i1 @ule_uge(i8 %a, i8 %b) {
1153
1035
1154
1036
define i1 @ule_ugt (i8 %a , i8 %b ) {
1155
1037
; 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
1160
1039
;
1161
1040
%cmp1 = icmp ule i8 %a , %b
1162
1041
%cmp2 = icmp ugt i8 %a , %b
@@ -1166,10 +1045,8 @@ define i1 @ule_ugt(i8 %a, i8 %b) {
1166
1045
1167
1046
define i1 @ule_ule (i8 %a , i8 %b ) {
1168
1047
; CHECK-LABEL: @ule_ule(
1169
- ; CHECK-NEXT: [[CMP1:%.*]] = icmp ule i8 %a, %b
1170
1048
; 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]]
1173
1050
;
1174
1051
%cmp1 = icmp ule i8 %a , %b
1175
1052
%cmp2 = icmp ule i8 %a , %b
@@ -1180,9 +1057,7 @@ define i1 @ule_ule(i8 %a, i8 %b) {
1180
1057
define i1 @ule_ult (i8 %a , i8 %b ) {
1181
1058
; CHECK-LABEL: @ule_ult(
1182
1059
; 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]]
1186
1061
;
1187
1062
%cmp1 = icmp ule i8 %a , %b
1188
1063
%cmp2 = icmp ult i8 %a , %b
@@ -1207,10 +1082,8 @@ define i1 @ult_eq(i8 %a, i8 %b) {
1207
1082
1208
1083
define i1 @ult_ne (i8 %a , i8 %b ) {
1209
1084
; CHECK-LABEL: @ult_ne(
1210
- ; CHECK-NEXT: [[CMP1:%.*]] = icmp ult i8 %a, %b
1211
1085
; 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]]
1214
1087
;
1215
1088
%cmp1 = icmp ult i8 %a , %b
1216
1089
%cmp2 = icmp ne i8 %a , %b
@@ -1272,10 +1145,7 @@ define i1 @ult_slt(i8 %a, i8 %b) {
1272
1145
1273
1146
define i1 @ult_uge (i8 %a , i8 %b ) {
1274
1147
; 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
1279
1149
;
1280
1150
%cmp1 = icmp ult i8 %a , %b
1281
1151
%cmp2 = icmp uge i8 %a , %b
@@ -1298,10 +1168,8 @@ define i1 @ult_ugt(i8 %a, i8 %b) {
1298
1168
1299
1169
define i1 @ult_ule (i8 %a , i8 %b ) {
1300
1170
; CHECK-LABEL: @ult_ule(
1301
- ; CHECK-NEXT: [[CMP1:%.*]] = icmp ult i8 %a, %b
1302
1171
; 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]]
1305
1173
;
1306
1174
%cmp1 = icmp ult i8 %a , %b
1307
1175
%cmp2 = icmp ule i8 %a , %b
@@ -1311,10 +1179,8 @@ define i1 @ult_ule(i8 %a, i8 %b) {
1311
1179
1312
1180
define i1 @ult_ult (i8 %a , i8 %b ) {
1313
1181
; CHECK-LABEL: @ult_ult(
1314
- ; CHECK-NEXT: [[CMP1:%.*]] = icmp ult i8 %a, %b
1315
1182
; 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]]
1318
1184
;
1319
1185
%cmp1 = icmp ult i8 %a , %b
1320
1186
%cmp2 = icmp ult i8 %a , %b
@@ -1326,10 +1192,7 @@ define i1 @ult_ult(i8 %a, i8 %b) {
1326
1192
1327
1193
define <2 x i1 > @ult_uge_vec (<2 x i8 > %a , <2 x i8 > %b ) {
1328
1194
; 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>
1333
1196
;
1334
1197
%cmp1 = icmp ult <2 x i8 > %a , %b
1335
1198
%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) {
1339
1202
1340
1203
define <2 x i1 > @ult_ule_vec (<2 x i8 > %a , <2 x i8 > %b ) {
1341
1204
; CHECK-LABEL: @ult_ule_vec(
1342
- ; CHECK-NEXT: [[CMP1:%.*]] = icmp ult <2 x i8> %a, %b
1343
1205
; 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]]
1346
1207
;
1347
1208
%cmp1 = icmp ult <2 x i8 > %a , %b
1348
1209
%cmp2 = icmp ule <2 x i8 > %a , %b
0 commit comments