[llvm-commits] [llvm] r60403 - /llvm/trunk/lib/Transforms/Scalar/InstructionCombining.cpp

Bill Wendling isanbard at gmail.com
Mon Dec 1 22:24:20 PST 2008


Author: void
Date: Tue Dec  2 00:24:20 2008
New Revision: 60403

URL: http://llvm.org/viewvc/llvm-project?rev=60403&view=rev
Log:
Remove some errors that crept in. No functionality change.

Modified:
    llvm/trunk/lib/Transforms/Scalar/InstructionCombining.cpp

Modified: llvm/trunk/lib/Transforms/Scalar/InstructionCombining.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Scalar/InstructionCombining.cpp?rev=60403&r1=60402&r2=60403&view=diff

==============================================================================
--- llvm/trunk/lib/Transforms/Scalar/InstructionCombining.cpp (original)
+++ llvm/trunk/lib/Transforms/Scalar/InstructionCombining.cpp Tue Dec  2 00:24:20 2008
@@ -4437,13 +4437,14 @@
   ConstantInt *CI1 = dyn_cast<ConstantInt>(C);
   if (!CI1) return 0;
 
-  Value *V1 = 0, *C2 = 0;
-  if (!match(Op, m_And(m_Value(V1), m_ConstantInt(C2)))) return 0;
+  Value *V1 = 0;
+  ConstantInt *CI2 = 0;
+  if (!match(Op, m_And(m_Value(V1), m_ConstantInt(CI2)))) return 0;
 
   APInt Xor = CI1->getValue() ^ CI2->getValue();
   if (!Xor.isAllOnesValue()) return 0;
 
-  if (V1 == A || V1 == B)
+  if (V1 == A || V1 == B) {
     Instruction *NewOp =
       InsertNewInstBefore(BinaryOperator::CreateAnd((V1 == A) ? B : A, CI1), I);
     return BinaryOperator::CreateOr(NewOp, V1);





More information about the llvm-commits mailing list