Skip to content

Commit 9e77acf

Browse files
committed
Review comments
Change-Id: I6642854a7a191ec364d4430ae70eeddf31f52685
1 parent 8636937 commit 9e77acf

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

llvm/lib/Transforms/InstCombine/InstCombineAndOrXor.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3651,7 +3651,6 @@ Instruction *InstCombinerImpl::visitOr(BinaryOperator &I) {
36513651
m_Select(m_Value(Cond0), m_APInt(Op0Eq), m_APInt(Op0Ne))) &&
36523652
match(I.getOperand(1),
36533653
m_Select(m_Value(Cond1), m_APInt(Op1Eq), m_APInt(Op1Ne)))) {
3654-
CmpPredicate Pred0, Pred1;
36553654

36563655
auto LHSDecompose =
36573656
decomposeBitTest(Cond0, /*LookThruTrunc=*/true,
@@ -3661,9 +3660,9 @@ Instruction *InstCombinerImpl::visitOr(BinaryOperator &I) {
36613660
/*AllowNonZeroC=*/false, /*DecomposeAnd=*/true);
36623661

36633662
if (LHSDecompose && RHSDecompose && LHSDecompose->X == RHSDecompose->X &&
3664-
(ICmpInst::isEquality(LHSDecompose->Pred)) &&
36653663
RHSDecompose->Mask.isPowerOf2() && LHSDecompose->Mask.isPowerOf2() &&
36663664
LHSDecompose->Mask != RHSDecompose->Mask) {
3665+
assert(ICmpInst::isEquality(LHSDecompose->Pred));
36673666
if (LHSDecompose->Pred == ICmpInst::ICMP_NE)
36683667
std::swap(Op0Eq, Op0Ne);
36693668
if (RHSDecompose->Pred == ICmpInst::ICMP_NE)

0 commit comments

Comments
 (0)