From: Chris Lattner Date: Sun, 1 Aug 2004 19:42:59 +0000 (+0000) Subject: Fix a regression in InstCombine/xor.ll X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=1484089bbf960f7191215dfa6c0bb51c8e30794e;p=oota-llvm.git Fix a regression in InstCombine/xor.ll git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15410 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Transforms/Scalar/InstructionCombining.cpp b/lib/Transforms/Scalar/InstructionCombining.cpp index b39f077d025..747abc2f5bb 100644 --- a/lib/Transforms/Scalar/InstructionCombining.cpp +++ b/lib/Transforms/Scalar/InstructionCombining.cpp @@ -1343,11 +1343,11 @@ Instruction *InstCombiner::visitXor(BinaryOperator &I) { return ReplaceInstUsesWith(I, Op0I->getOperand(0)); } - // (A & C1)^(B & C2) -> (A & C1)|(B & C2) iff C1^C2 == 0 + // (A & C1)^(B & C2) -> (A & C1)|(B & C2) iff C1&C2 == 0 Value *A, *B; ConstantInt *C1, *C2; if (match(Op0, m_And(m_Value(A), m_ConstantInt(C1))) && match(Op1, m_And(m_Value(B), m_ConstantInt(C2))) && - ConstantExpr::getXor(C1, C2)->isNullValue()) + ConstantExpr::getAnd(C1, C2)->isNullValue()) return BinaryOperator::createOr(Op0, Op1); // (setcc1 A, B) ^ (setcc2 A, B) --> (setcc3 A, B)