Skip to content

Commit 12d1a95

Browse files
committed
Address review comments 2
1 parent e7da912 commit 12d1a95

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

llvm/lib/Transforms/InstCombine/InstCombineSelect.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3562,7 +3562,7 @@ static Instruction *foldBitCeil(SelectInst &SI, IRBuilderBase &Builder) {
35623562
// (x < y) ? -1 : zext(x != y)
35633563
// (x > y) ? 1 : sext(x != y)
35643564
// Into ucmp/scmp(x, y), where signedness is determined by the signedness
3565-
// of the comparison in the original sequence
3565+
// of the comparison in the original sequence.
35663566
Instruction *InstCombinerImpl::foldSelectToCmp(SelectInst &SI) {
35673567
Value *TV = SI.getTrueValue();
35683568
Value *FV = SI.getFalseValue();
@@ -3580,7 +3580,7 @@ Instruction *InstCombinerImpl::foldSelectToCmp(SelectInst &SI) {
35803580
// constant inside select to determine if swapping operands would be
35813581
// beneficial to us.
35823582
if ((ICmpInst::isGT(Pred) && match(TV, m_AllOnes())) ||
3583-
(ICmpInst::isLT(Pred) && match(TV, m_One())) || ICmpInst::isLE(Pred)) {
3583+
(ICmpInst::isLT(Pred) && match(TV, m_One()))) {
35843584
Pred = ICmpInst::getSwappedPredicate(Pred);
35853585
std::swap(LHS, RHS);
35863586
}

0 commit comments

Comments
 (0)