This transform is also performed by InstructionSimplify, remove the duplicate.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113608 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Benjamin Kramer 2010-09-10 19:52:35 +00:00
parent b28f579200
commit 0ca25608b9

View File

@ -207,9 +207,6 @@ Instruction *InstCombiner::OptAndOp(Instruction *Op,
}
break;
case Instruction::Or:
if (Together == AndRHS) // (X | C) & C --> C
return ReplaceInstUsesWith(TheAnd, AndRHS);
if (Op->hasOneUse() && Together != OpRHS) {
// (X | C1) & C2 --> (X | (C1&C2)) & C2
Value *Or = Builder->CreateOr(X, Together);