Skip to content

Commit 38c15e0

Browse files
committed
cleanup
1 parent 3a704b6 commit 38c15e0

File tree

1 file changed

+4
-7
lines changed

1 file changed

+4
-7
lines changed

llvm/lib/Transforms/InstCombine/InstCombineSelect.cpp

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1850,7 +1850,7 @@ static Instruction *foldSelectICmpEq(SelectInst &SI, ICmpInst *ICI,
18501850
return nullptr;
18511851

18521852
const unsigned AndOps = Instruction::And, OrOps = Instruction::Or,
1853-
XorOps = Instruction::Xor, NoOps = 0;
1853+
XorOps = Instruction::Xor;
18541854
enum NotMask { None = 0, NotInner, NotRHS };
18551855

18561856
// We cannot refine TrueVal to FalseVal when the inner instruction contains
@@ -1860,16 +1860,13 @@ static Instruction *foldSelectICmpEq(SelectInst &SI, ICmpInst *ICI,
18601860
auto matchInner =
18611861
m_CombineAnd(m_c_BinOp(InnerOpc, m_Specific(X), m_Specific(Y)),
18621862
m_Unless(m_DisjointOr(m_Value(), m_Value())));
1863-
if (NotMask == NotInner) {
1863+
if (NotMask == NotInner)
18641864
return match(FalseVal, m_c_BinOp(OuterOpc, m_NotForbidPoison(matchInner),
18651865
m_Specific(CmpRHS)));
1866-
} else if (NotMask == NotRHS) {
1866+
if (NotMask == NotRHS)
18671867
return match(FalseVal, m_c_BinOp(OuterOpc, matchInner,
18681868
m_NotForbidPoison(m_Specific(CmpRHS))));
1869-
} else {
1870-
return match(FalseVal,
1871-
m_c_BinOp(OuterOpc, matchInner, m_Specific(CmpRHS)));
1872-
}
1869+
return match(FalseVal, m_c_BinOp(OuterOpc, matchInner, m_Specific(CmpRHS)));
18731870
};
18741871

18751872
// (X&Y)==C ? X|Y : X^Y -> (X^Y)|C : X^Y or (X^Y)^ C : X^Y

0 commit comments

Comments
 (0)