This transform is also performed by InstructionSimplify, remove the duplicate.
authorBenjamin Kramer <benny.kra@googlemail.com>
Fri, 10 Sep 2010 19:52:35 +0000 (19:52 +0000)
committerBenjamin Kramer <benny.kra@googlemail.com>
Fri, 10 Sep 2010 19:52:35 +0000 (19:52 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113608 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Transforms/InstCombine/InstCombineAndOrXor.cpp

index b4ba875db90700ef93f239c362c26483a1b63efe..3dc8779879d6e84ff28a92a22e39be0f14ebb157 100644 (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);