reduce indentation

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92766 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Chris Lattner
2010-01-05 20:56:24 +00:00
parent 6ca835dedf
commit 3168c7dd25

View File

@ -35,8 +35,12 @@ static Constant *SubOne(ConstantInt *C) {
// Otherwise, return null.
//
static inline Value *dyn_castFoldableMul(Value *V, ConstantInt *&CST) {
if (V->hasOneUse() && V->getType()->isInteger())
if (Instruction *I = dyn_cast<Instruction>(V)) {
if (!V->hasOneUse() || !V->getType()->isInteger())
return 0;
Instruction *I = dyn_cast<Instruction>(V);
if (I == 0) return 0;
if (I->getOpcode() == Instruction::Mul)
if ((CST = dyn_cast<ConstantInt>(I->getOperand(1))))
return I->getOperand(0);
@ -49,7 +53,6 @@ static inline Value *dyn_castFoldableMul(Value *V, ConstantInt *&CST) {
APInt(BitWidth, 1).shl(CSTVal));
return I->getOperand(0);
}
}
return 0;
}