diff options
author | Bill Wendling <isanbard@gmail.com> | 2008-12-02 06:24:20 +0000 |
---|---|---|
committer | Bill Wendling <isanbard@gmail.com> | 2008-12-02 06:24:20 +0000 |
commit | 87beb9b909da8cfd1fd88f259cc767d972c07f0e (patch) | |
tree | 1986ba98254c1c12d1e7e86450ff4f892267e705 /llvm/lib/Transforms | |
parent | 790b4bf9a941884423c2d1f4cdcf26725b74b332 (diff) | |
download | bcm5719-llvm-87beb9b909da8cfd1fd88f259cc767d972c07f0e.tar.gz bcm5719-llvm-87beb9b909da8cfd1fd88f259cc767d972c07f0e.zip |
Remove some errors that crept in. No functionality change.
llvm-svn: 60403
Diffstat (limited to 'llvm/lib/Transforms')
-rw-r--r-- | llvm/lib/Transforms/Scalar/InstructionCombining.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/llvm/lib/Transforms/Scalar/InstructionCombining.cpp b/llvm/lib/Transforms/Scalar/InstructionCombining.cpp index b382731586e..4914c110cb7 100644 --- a/llvm/lib/Transforms/Scalar/InstructionCombining.cpp +++ b/llvm/lib/Transforms/Scalar/InstructionCombining.cpp @@ -4437,13 +4437,14 @@ Instruction *InstCombiner::FoldOrWithConstants(BinaryOperator &I, Value *Op, 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); |