diff options
-rw-r--r-- | lib/Transforms/Scalar/InstructionCombining.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/Transforms/Scalar/InstructionCombining.cpp b/lib/Transforms/Scalar/InstructionCombining.cpp index 50a26c18c9..f336722dd7 100644 --- a/lib/Transforms/Scalar/InstructionCombining.cpp +++ b/lib/Transforms/Scalar/InstructionCombining.cpp @@ -329,10 +329,10 @@ static inline Value *dyn_castFoldableMul(Value *V, ConstantInt *&CST) { if (V->hasOneUse() && V->getType()->isInteger()) if (Instruction *I = dyn_cast<Instruction>(V)) { if (I->getOpcode() == Instruction::Mul) - if (CST = dyn_cast<ConstantInt>(I->getOperand(1))) + if ((CST = dyn_cast<ConstantInt>(I->getOperand(1)))) return I->getOperand(0); if (I->getOpcode() == Instruction::Shl) - if (CST = dyn_cast<ConstantInt>(I->getOperand(1))) { + if ((CST = dyn_cast<ConstantInt>(I->getOperand(1)))) { // The multiplier is really 1 << CST. Constant *One = ConstantInt::get(V->getType(), 1); CST = cast<ConstantInt>(ConstantExpr::getShl(One, CST)); |