Skip to content

Commit 116caa2

Browse files
committedSep 10, 2018
[InstCombine] Partially revert rL341674 due to PR38897.
Summary: Revert min/max changes in rL341674 dues to high compile times causing timeouts (PR38897). Checking in to unblock failing builds. Patch available for post-commit review and re-revert once resolved. Working on a smaller reproducer for PR38897. Reviewers: craig.topper, spatel Subscribers: sanjoy, jlebar, llvm-commits Differential Revision: https://reviews.llvm.org/D51897 llvm-svn: 341883
1 parent cd7bd82 commit 116caa2

File tree

6 files changed

+62
-83
lines changed

6 files changed

+62
-83
lines changed
 

‎llvm/lib/Transforms/InstCombine/InstCombineSelect.cpp

+8-35
Original file line numberDiff line numberDiff line change
@@ -1827,42 +1827,15 @@ Instruction *InstCombiner::visitSelectInst(SelectInst &SI) {
18271827
}
18281828

18291829
// MAX(~a, ~b) -> ~MIN(a, b)
1830-
// MAX(~a, C) -> ~MIN(a, ~C)
18311830
// MIN(~a, ~b) -> ~MAX(a, b)
1832-
// MIN(~a, C) -> ~MAX(a, ~C)
1833-
auto moveNotAfterMinMax = [&](Value *X, Value *Y,
1834-
bool Swapped) -> Instruction * {
1835-
Value *A;
1836-
if (match(X, m_Not(m_Value(A))) && !X->hasNUsesOrMore(3) &&
1837-
// Passing false to only consider m_Not and constants.
1838-
IsFreeToInvert(Y, false)) {
1839-
Value *B = Builder.CreateNot(Y);
1840-
Value *NewMinMax = createMinMax(Builder, getInverseMinMaxFlavor(SPF),
1841-
A, B);
1842-
// Copy the profile metadata.
1843-
if (MDNode *MD = SI.getMetadata(LLVMContext::MD_prof)) {
1844-
cast<SelectInst>(NewMinMax)->setMetadata(LLVMContext::MD_prof, MD);
1845-
// Swap the metadata if the operands are swapped.
1846-
if (Swapped) {
1847-
assert(X == SI.getFalseValue() && Y == SI.getTrueValue() &&
1848-
"Unexpected operands.");
1849-
cast<SelectInst>(NewMinMax)->swapProfMetadata();
1850-
} else {
1851-
assert(X == SI.getTrueValue() && Y == SI.getFalseValue() &&
1852-
"Unexpected operands.");
1853-
}
1854-
}
1855-
1856-
return BinaryOperator::CreateNot(NewMinMax);
1857-
}
1858-
1859-
return nullptr;
1860-
};
1861-
1862-
if (Instruction *I = moveNotAfterMinMax(LHS, RHS, /*Swapped*/false))
1863-
return I;
1864-
if (Instruction *I = moveNotAfterMinMax(RHS, LHS, /*Swapped*/true))
1865-
return I;
1831+
Value *A, *B;
1832+
if (match(LHS, m_Not(m_Value(A))) && match(RHS, m_Not(m_Value(B))) &&
1833+
(!LHS->hasNUsesOrMore(3) || !RHS->hasNUsesOrMore(3))) {
1834+
CmpInst::Predicate InvertedPred = getInverseMinMaxPred(SPF);
1835+
Value *InvertedCmp = Builder.CreateICmp(InvertedPred, A, B);
1836+
Value *NewSel = Builder.CreateSelect(InvertedCmp, A, B);
1837+
return BinaryOperator::CreateNot(NewSel);
1838+
}
18661839

18671840
if (Instruction *I = factorizeMinMaxTree(SPF, LHS, RHS, Builder))
18681841
return I;

‎llvm/test/Transforms/InstCombine/max-of-nots.ll

+9-9
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
define <2 x i32> @umin_of_nots(<2 x i32> %x, <2 x i32> %y) {
55
; CHECK-LABEL: @umin_of_nots(
6-
; CHECK-NEXT: [[TMP1:%.*]] = icmp ult <2 x i32> [[Y:%.*]], [[X:%.*]]
6+
; CHECK-NEXT: [[TMP1:%.*]] = icmp ugt <2 x i32> [[X:%.*]], [[Y:%.*]]
77
; CHECK-NEXT: [[TMP2:%.*]] = select <2 x i1> [[TMP1]], <2 x i32> [[X]], <2 x i32> [[Y]]
88
; CHECK-NEXT: [[MIN:%.*]] = xor <2 x i32> [[TMP2]], <i32 -1, i32 -1>
99
; CHECK-NEXT: ret <2 x i32> [[MIN]]
@@ -17,7 +17,7 @@ define <2 x i32> @umin_of_nots(<2 x i32> %x, <2 x i32> %y) {
1717

1818
define <2 x i32> @smin_of_nots(<2 x i32> %x, <2 x i32> %y) {
1919
; CHECK-LABEL: @smin_of_nots(
20-
; CHECK-NEXT: [[TMP1:%.*]] = icmp slt <2 x i32> [[Y:%.*]], [[X:%.*]]
20+
; CHECK-NEXT: [[TMP1:%.*]] = icmp sgt <2 x i32> [[X:%.*]], [[Y:%.*]]
2121
; CHECK-NEXT: [[TMP2:%.*]] = select <2 x i1> [[TMP1]], <2 x i32> [[X]], <2 x i32> [[Y]]
2222
; CHECK-NEXT: [[MIN:%.*]] = xor <2 x i32> [[TMP2]], <i32 -1, i32 -1>
2323
; CHECK-NEXT: ret <2 x i32> [[MIN]]
@@ -31,7 +31,7 @@ define <2 x i32> @smin_of_nots(<2 x i32> %x, <2 x i32> %y) {
3131

3232
define i32 @compute_min_2(i32 %x, i32 %y) {
3333
; CHECK-LABEL: @compute_min_2(
34-
; CHECK-NEXT: [[TMP1:%.*]] = icmp sgt i32 [[Y:%.*]], [[X:%.*]]
34+
; CHECK-NEXT: [[TMP1:%.*]] = icmp slt i32 [[X:%.*]], [[Y:%.*]]
3535
; CHECK-NEXT: [[TMP2:%.*]] = select i1 [[TMP1]], i32 [[X]], i32 [[Y]]
3636
; CHECK-NEXT: ret i32 [[TMP2]]
3737
;
@@ -47,8 +47,8 @@ declare void @extra_use(i8)
4747
define i8 @umin_not_1_extra_use(i8 %x, i8 %y) {
4848
; CHECK-LABEL: @umin_not_1_extra_use(
4949
; CHECK-NEXT: [[NX:%.*]] = xor i8 [[X:%.*]], -1
50-
; CHECK-NEXT: [[TMP1:%.*]] = icmp ult i8 [[X]], [[Y:%.*]]
51-
; CHECK-NEXT: [[TMP2:%.*]] = select i1 [[TMP1]], i8 [[Y]], i8 [[X]]
50+
; CHECK-NEXT: [[TMP1:%.*]] = icmp ugt i8 [[X]], [[Y:%.*]]
51+
; CHECK-NEXT: [[TMP2:%.*]] = select i1 [[TMP1]], i8 [[X]], i8 [[Y]]
5252
; CHECK-NEXT: [[MINXY:%.*]] = xor i8 [[TMP2]], -1
5353
; CHECK-NEXT: call void @extra_use(i8 [[NX]])
5454
; CHECK-NEXT: ret i8 [[MINXY]]
@@ -84,7 +84,7 @@ define i8 @umin_not_2_extra_use(i8 %x, i8 %y) {
8484

8585
define i8 @umin3_not(i8 %x, i8 %y, i8 %z) {
8686
; CHECK-LABEL: @umin3_not(
87-
; CHECK-NEXT: [[TMP1:%.*]] = icmp ult i8 [[Z:%.*]], [[X:%.*]]
87+
; CHECK-NEXT: [[TMP1:%.*]] = icmp ugt i8 [[X:%.*]], [[Z:%.*]]
8888
; CHECK-NEXT: [[TMP2:%.*]] = select i1 [[TMP1]], i8 [[X]], i8 [[Z]]
8989
; CHECK-NEXT: [[TMP3:%.*]] = icmp ugt i8 [[TMP2]], [[Y:%.*]]
9090
; CHECK-NEXT: [[R_V:%.*]] = select i1 [[TMP3]], i8 [[TMP2]], i8 [[Y]]
@@ -109,8 +109,8 @@ define i8 @umin3_not_more_uses(i8 %x, i8 %y, i8 %z) {
109109
; CHECK-LABEL: @umin3_not_more_uses(
110110
; CHECK-NEXT: [[NX:%.*]] = xor i8 [[X:%.*]], -1
111111
; CHECK-NEXT: [[NY:%.*]] = xor i8 [[Y:%.*]], -1
112-
; CHECK-NEXT: [[TMP1:%.*]] = icmp ult i8 [[X]], [[Z:%.*]]
113-
; CHECK-NEXT: [[TMP2:%.*]] = select i1 [[TMP1]], i8 [[Z]], i8 [[X]]
112+
; CHECK-NEXT: [[TMP1:%.*]] = icmp ugt i8 [[X]], [[Z:%.*]]
113+
; CHECK-NEXT: [[TMP2:%.*]] = select i1 [[TMP1]], i8 [[X]], i8 [[Z]]
114114
; CHECK-NEXT: [[TMP3:%.*]] = icmp ugt i8 [[TMP2]], [[Y]]
115115
; CHECK-NEXT: [[TMP4:%.*]] = select i1 [[TMP3]], i8 [[TMP2]], i8 [[Y]]
116116
; CHECK-NEXT: [[R:%.*]] = xor i8 [[TMP4]], -1
@@ -198,7 +198,7 @@ define void @umin3_not_all_ops_extra_uses_invert_subs(i8 %x, i8 %y, i8 %z) {
198198

199199
define i32 @compute_min_3(i32 %x, i32 %y, i32 %z) {
200200
; CHECK-LABEL: @compute_min_3(
201-
; CHECK-NEXT: [[TMP1:%.*]] = icmp sgt i32 [[Y:%.*]], [[X:%.*]]
201+
; CHECK-NEXT: [[TMP1:%.*]] = icmp slt i32 [[X:%.*]], [[Y:%.*]]
202202
; CHECK-NEXT: [[TMP2:%.*]] = select i1 [[TMP1]], i32 [[X]], i32 [[Y]]
203203
; CHECK-NEXT: [[TMP3:%.*]] = icmp slt i32 [[TMP2]], [[Z:%.*]]
204204
; CHECK-NEXT: [[TMP4:%.*]] = select i1 [[TMP3]], i32 [[TMP2]], i32 [[Z]]

‎llvm/test/Transforms/InstCombine/select.ll

+4-4
Original file line numberDiff line numberDiff line change
@@ -1329,13 +1329,13 @@ define i32 @PR23757(i32 %x) {
13291329
ret i32 %sel
13301330
}
13311331

1332-
; max(max(~a, -1), -1) --> ~min(a, 0)
1332+
; max(max(~a, -1), -1) --> max(~a, -1)
13331333

13341334
define i32 @PR27137(i32 %a) {
13351335
; CHECK-LABEL: @PR27137(
1336-
; CHECK-NEXT: [[TMP1:%.*]] = icmp slt i32 [[A:%.*]], 0
1337-
; CHECK-NEXT: [[TMP2:%.*]] = select i1 [[TMP1]], i32 [[A]], i32 0
1338-
; CHECK-NEXT: [[S1:%.*]] = xor i32 [[TMP2]], -1
1336+
; CHECK-NEXT: [[NOT_A:%.*]] = xor i32 [[A:%.*]], -1
1337+
; CHECK-NEXT: [[TMP1:%.*]] = icmp sgt i32 [[NOT_A]], -1
1338+
; CHECK-NEXT: [[S1:%.*]] = select i1 [[TMP1]], i32 [[NOT_A]], i32 -1
13391339
; CHECK-NEXT: ret i32 [[S1]]
13401340
;
13411341
%not_a = xor i32 %a, -1

‎llvm/test/Transforms/InstCombine/select_meta.ll

+16-16
Original file line numberDiff line numberDiff line change
@@ -194,12 +194,12 @@ define i32 @test74(i32 %x) {
194194
ret i32 %retval
195195
}
196196

197-
; The xor is moved after the select. The metadata remains the same because the select operands are not swapped only inverted.
197+
; The compare should change, but the metadata remains the same because the select operands are not swapped.
198198
define i32 @smin1(i32 %x) {
199199
; CHECK-LABEL: @smin1(
200-
; CHECK-NEXT: [[TMP1:%.*]] = icmp sgt i32 [[X:%.*]], 0
201-
; CHECK-NEXT: [[TMP2:%.*]] = select i1 [[TMP1]], i32 [[X]], i32 0, !prof ![[$MD1]]
202-
; CHECK-NEXT: [[SEL:%.*]] = xor i32 [[TMP2]], -1
200+
; CHECK-NEXT: [[NOT_X:%.*]] = xor i32 %x, -1
201+
; CHECK-NEXT: [[CMP:%.*]] = icmp slt i32 [[NOT_X]], -1
202+
; CHECK-NEXT: [[SEL:%.*]] = select i1 [[CMP]], i32 [[NOT_X]], i32 -1, !prof ![[$MD1]]
203203
; CHECK-NEXT: ret i32 [[SEL]]
204204
;
205205
%not_x = xor i32 %x, -1
@@ -208,12 +208,12 @@ define i32 @smin1(i32 %x) {
208208
ret i32 %sel
209209
}
210210

211-
; The compare should change, and the metadata is swapped because the select operands are swapped and inverted.
211+
; The compare should change, and the metadata is swapped because the select operands are swapped.
212212
define i32 @smin2(i32 %x) {
213213
; CHECK-LABEL: @smin2(
214-
; CHECK-NEXT: [[TMP1:%.*]] = icmp sgt i32 [[X:%.*]], 0
215-
; CHECK-NEXT: [[TMP2:%.*]] = select i1 [[TMP1]], i32 [[X]], i32 0, !prof ![[$MD3]]
216-
; CHECK-NEXT: [[SEL:%.*]] = xor i32 [[TMP2]], -1
214+
; CHECK-NEXT: [[NOT_X:%.*]] = xor i32 %x, -1
215+
; CHECK-NEXT: [[CMP:%.*]] = icmp slt i32 [[NOT_X]], -1
216+
; CHECK-NEXT: [[SEL:%.*]] = select i1 [[CMP]], i32 [[NOT_X]], i32 -1, !prof ![[$MD3]]
217217
; CHECK-NEXT: ret i32 [[SEL]]
218218
;
219219
%not_x = xor i32 %x, -1
@@ -222,12 +222,12 @@ define i32 @smin2(i32 %x) {
222222
ret i32 %sel
223223
}
224224

225-
; The xor is moved after the select. The metadata remains the same because the select operands are not swapped only inverted.
225+
; The compare should change, but the metadata remains the same because the select operands are not swapped.
226226
define i32 @smax1(i32 %x) {
227227
; CHECK-LABEL: @smax1(
228-
; CHECK-NEXT: [[TMP1:%.*]] = icmp slt i32 [[X:%.*]], 0
229-
; CHECK-NEXT: [[TMP2:%.*]] = select i1 [[TMP1]], i32 [[X]], i32 0, !prof ![[$MD1]]
230-
; CHECK-NEXT: [[SEL:%.*]] = xor i32 [[TMP2]], -1
228+
; CHECK-NEXT: [[NOT_X:%.*]] = xor i32 %x, -1
229+
; CHECK-NEXT: [[CMP:%.*]] = icmp sgt i32 [[NOT_X]], -1
230+
; CHECK-NEXT: [[SEL:%.*]] = select i1 [[CMP]], i32 [[NOT_X]], i32 -1, !prof ![[$MD1]]
231231
; CHECK-NEXT: ret i32 [[SEL]]
232232
;
233233
%not_x = xor i32 %x, -1
@@ -236,12 +236,12 @@ define i32 @smax1(i32 %x) {
236236
ret i32 %sel
237237
}
238238

239-
; The compare should change, and the metadata is swapped because the select operands are swapped and inverted.
239+
; The compare should change, and the metadata is swapped because the select operands are swapped.
240240
define i32 @smax2(i32 %x) {
241241
; CHECK-LABEL: @smax2(
242-
; CHECK-NEXT: [[TMP1:%.*]] = icmp slt i32 [[X:%.*]], 0
243-
; CHECK-NEXT: [[TMP2:%.*]] = select i1 [[TMP1]], i32 [[X]], i32 0, !prof ![[$MD3]]
244-
; CHECK-NEXT: [[SEL:%.*]] = xor i32 [[TMP2]], -1
242+
; CHECK-NEXT: [[NOT_X:%.*]] = xor i32 %x, -1
243+
; CHECK-NEXT: [[CMP:%.*]] = icmp sgt i32 [[NOT_X]], -1
244+
; CHECK-NEXT: [[SEL:%.*]] = select i1 [[CMP]], i32 [[NOT_X]], i32 -1, !prof ![[$MD3]]
245245
; CHECK-NEXT: ret i32 [[SEL]]
246246
;
247247
%not_x = xor i32 %x, -1

‎llvm/test/Transforms/InstCombine/sub.ll

+24-18
Original file line numberDiff line numberDiff line change
@@ -1060,9 +1060,10 @@ define <2 x i32> @test63vec(<2 x i32> %A) {
10601060
; FIXME: Transform (neg (max ~X, C)) -> ((min X, ~C) + 1). Same for min.
10611061
define i32 @test64(i32 %x) {
10621062
; CHECK-LABEL: @test64(
1063-
; CHECK-NEXT: [[TMP1:%.*]] = icmp slt i32 [[X:%.*]], 255
1064-
; CHECK-NEXT: [[TMP2:%.*]] = select i1 [[TMP1]], i32 [[X]], i32 255
1065-
; CHECK-NEXT: [[RES:%.*]] = add i32 [[TMP2]], 1
1063+
; CHECK-NEXT: [[TMP1:%.*]] = xor i32 [[X:%.*]], -1
1064+
; CHECK-NEXT: [[TMP2:%.*]] = icmp sgt i32 [[TMP1]], -256
1065+
; CHECK-NEXT: [[TMP3:%.*]] = select i1 [[TMP2]], i32 [[TMP1]], i32 -256
1066+
; CHECK-NEXT: [[RES:%.*]] = sub i32 0, [[TMP3]]
10661067
; CHECK-NEXT: ret i32 [[RES]]
10671068
;
10681069
%1 = xor i32 %x, -1
@@ -1074,9 +1075,10 @@ define i32 @test64(i32 %x) {
10741075

10751076
define i32 @test65(i32 %x) {
10761077
; CHECK-LABEL: @test65(
1077-
; CHECK-NEXT: [[TMP1:%.*]] = icmp sgt i32 [[X:%.*]], -256
1078-
; CHECK-NEXT: [[TMP2:%.*]] = select i1 [[TMP1]], i32 [[X]], i32 -256
1079-
; CHECK-NEXT: [[RES:%.*]] = add i32 [[TMP2]], 1
1078+
; CHECK-NEXT: [[TMP1:%.*]] = xor i32 [[X:%.*]], -1
1079+
; CHECK-NEXT: [[TMP2:%.*]] = icmp slt i32 [[TMP1]], 255
1080+
; CHECK-NEXT: [[TMP3:%.*]] = select i1 [[TMP2]], i32 [[TMP1]], i32 255
1081+
; CHECK-NEXT: [[RES:%.*]] = sub i32 0, [[TMP3]]
10801082
; CHECK-NEXT: ret i32 [[RES]]
10811083
;
10821084
%1 = xor i32 %x, -1
@@ -1088,9 +1090,10 @@ define i32 @test65(i32 %x) {
10881090

10891091
define i32 @test66(i32 %x) {
10901092
; CHECK-LABEL: @test66(
1091-
; CHECK-NEXT: [[TMP1:%.*]] = icmp ult i32 [[X:%.*]], -101
1092-
; CHECK-NEXT: [[TMP2:%.*]] = select i1 [[TMP1]], i32 [[X]], i32 -101
1093-
; CHECK-NEXT: [[RES:%.*]] = add i32 [[TMP2]], 1
1093+
; CHECK-NEXT: [[TMP1:%.*]] = xor i32 [[X:%.*]], -1
1094+
; CHECK-NEXT: [[TMP2:%.*]] = icmp ugt i32 [[TMP1]], 100
1095+
; CHECK-NEXT: [[TMP3:%.*]] = select i1 [[TMP2]], i32 [[TMP1]], i32 100
1096+
; CHECK-NEXT: [[RES:%.*]] = sub i32 0, [[TMP3]]
10941097
; CHECK-NEXT: ret i32 [[RES]]
10951098
;
10961099
%1 = xor i32 %x, -1
@@ -1102,9 +1105,10 @@ define i32 @test66(i32 %x) {
11021105

11031106
define i32 @test67(i32 %x) {
11041107
; CHECK-LABEL: @test67(
1105-
; CHECK-NEXT: [[TMP1:%.*]] = icmp ugt i32 [[X:%.*]], 100
1106-
; CHECK-NEXT: [[TMP2:%.*]] = select i1 [[TMP1]], i32 [[X]], i32 100
1107-
; CHECK-NEXT: [[RES:%.*]] = add i32 [[TMP2]], 1
1108+
; CHECK-NEXT: [[TMP1:%.*]] = xor i32 [[X:%.*]], -1
1109+
; CHECK-NEXT: [[TMP2:%.*]] = icmp ult i32 [[TMP1]], -101
1110+
; CHECK-NEXT: [[TMP3:%.*]] = select i1 [[TMP2]], i32 [[TMP1]], i32 -101
1111+
; CHECK-NEXT: [[RES:%.*]] = sub i32 0, [[TMP3]]
11081112
; CHECK-NEXT: ret i32 [[RES]]
11091113
;
11101114
%1 = xor i32 %x, -1
@@ -1117,9 +1121,10 @@ define i32 @test67(i32 %x) {
11171121
; Check splat vectors too
11181122
define <2 x i32> @test68(<2 x i32> %x) {
11191123
; CHECK-LABEL: @test68(
1120-
; CHECK-NEXT: [[TMP1:%.*]] = icmp slt <2 x i32> [[X:%.*]], <i32 255, i32 255>
1121-
; CHECK-NEXT: [[TMP2:%.*]] = select <2 x i1> [[TMP1]], <2 x i32> [[X]], <2 x i32> <i32 255, i32 255>
1122-
; CHECK-NEXT: [[RES:%.*]] = add <2 x i32> [[TMP2]], <i32 1, i32 1>
1124+
; CHECK-NEXT: [[TMP1:%.*]] = xor <2 x i32> [[X:%.*]], <i32 -1, i32 -1>
1125+
; CHECK-NEXT: [[TMP2:%.*]] = icmp sgt <2 x i32> [[TMP1]], <i32 -256, i32 -256>
1126+
; CHECK-NEXT: [[TMP3:%.*]] = select <2 x i1> [[TMP2]], <2 x i32> [[TMP1]], <2 x i32> <i32 -256, i32 -256>
1127+
; CHECK-NEXT: [[RES:%.*]] = sub <2 x i32> zeroinitializer, [[TMP3]]
11231128
; CHECK-NEXT: ret <2 x i32> [[RES]]
11241129
;
11251130
%1 = xor <2 x i32> %x, <i32 -1, i32 -1>
@@ -1132,9 +1137,10 @@ define <2 x i32> @test68(<2 x i32> %x) {
11321137
; And non-splat constant vectors.
11331138
define <2 x i32> @test69(<2 x i32> %x) {
11341139
; CHECK-LABEL: @test69(
1135-
; CHECK-NEXT: [[TMP1:%.*]] = icmp slt <2 x i32> [[X:%.*]], <i32 255, i32 127>
1136-
; CHECK-NEXT: [[TMP2:%.*]] = select <2 x i1> [[TMP1]], <2 x i32> [[X]], <2 x i32> <i32 255, i32 127>
1137-
; CHECK-NEXT: [[RES:%.*]] = add <2 x i32> [[TMP2]], <i32 1, i32 1>
1140+
; CHECK-NEXT: [[TMP1:%.*]] = xor <2 x i32> [[X:%.*]], <i32 -1, i32 -1>
1141+
; CHECK-NEXT: [[TMP2:%.*]] = icmp sgt <2 x i32> [[TMP1]], <i32 -256, i32 -128>
1142+
; CHECK-NEXT: [[TMP3:%.*]] = select <2 x i1> [[TMP2]], <2 x i32> [[TMP1]], <2 x i32> <i32 -256, i32 -128>
1143+
; CHECK-NEXT: [[RES:%.*]] = sub <2 x i32> zeroinitializer, [[TMP3]]
11381144
; CHECK-NEXT: ret <2 x i32> [[RES]]
11391145
;
11401146
%1 = xor <2 x i32> %x, <i32 -1, i32 -1>

‎llvm/test/Transforms/InstCombine/xor.ll

+1-1
Original file line numberDiff line numberDiff line change
@@ -757,7 +757,7 @@ define i32 @test44(i32 %x, i32 %y) {
757757

758758
define i32 @test45(i32 %x, i32 %y) {
759759
; CHECK-LABEL: @test45(
760-
; CHECK-NEXT: [[TMP1:%.*]] = icmp ult i32 [[X:%.*]], [[Y:%.*]]
760+
; CHECK-NEXT: [[TMP1:%.*]] = icmp ugt i32 [[Y:%.*]], [[X:%.*]]
761761
; CHECK-NEXT: [[TMP2:%.*]] = select i1 [[TMP1]], i32 [[Y]], i32 [[X]]
762762
; CHECK-NEXT: ret i32 [[TMP2]]
763763
;

0 commit comments

Comments
 (0)
Please sign in to comment.