Quiet warnings on the persephone tester

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17821 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Chris Lattner 2004-11-15 05:54:07 +00:00
parent 7e529e4b3c
commit 50e60c7026

View File

@ -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));