[InstCombine] Remove a And transform that should be handled by SimplifyDemandedInstructionBits. NFCI

llvm-svn: 299349
This commit is contained in:
Craig Topper 2017-04-03 06:02:09 +00:00
parent cf38eb99de
commit 07944f891c
1 changed files with 0 additions and 7 deletions

View File

@ -159,13 +159,6 @@ Instruction *InstCombiner::OptAndOp(BinaryOperator *Op,
break;
case Instruction::Or:
if (Op->hasOneUse()){
if (Together != OpRHS) {
// (X | C1) & C2 --> (X | (C1&C2)) & C2
Value *Or = Builder->CreateOr(X, Together);
Or->takeName(Op);
return BinaryOperator::CreateAnd(Or, AndRHS);
}
ConstantInt *TogetherCI = dyn_cast<ConstantInt>(Together);
if (TogetherCI && !TogetherCI->isZero()){
// (X | C1) & C2 --> (X & (C2^(C1&C2))) | C1