From 841af4f03d1e93f16a5af36e14abd7bf5993580e Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Tue, 5 Jan 2010 05:42:08 +0000 Subject: [PATCH] reduce indentation llvm-svn: 92684 --- .../Transforms/InstCombine/InstCombineVectorOps.cpp | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/llvm/lib/Transforms/InstCombine/InstCombineVectorOps.cpp b/llvm/lib/Transforms/InstCombine/InstCombineVectorOps.cpp index 9977b830f370..f11f55788806 100644 --- a/llvm/lib/Transforms/InstCombine/InstCombineVectorOps.cpp +++ b/llvm/lib/Transforms/InstCombine/InstCombineVectorOps.cpp @@ -86,11 +86,12 @@ static Value *FindScalarElement(Value *V, unsigned EltNo) { if (isa(V)) return UndefValue::get(PTy->getElementType()); - else if (isa(V)) + if (isa(V)) return Constant::getNullValue(PTy->getElementType()); - else if (ConstantVector *CP = dyn_cast(V)) + if (ConstantVector *CP = dyn_cast(V)) return CP->getOperand(EltNo); - else if (InsertElementInst *III = dyn_cast(V)) { + + if (InsertElementInst *III = dyn_cast(V)) { // If this is an insert to a variable element, we don't know what it is. if (!isa(III->getOperand(2))) return 0; @@ -104,7 +105,9 @@ static Value *FindScalarElement(Value *V, unsigned EltNo) { // Otherwise, the insertelement doesn't modify the value, recurse on its // vector input. return FindScalarElement(III->getOperand(0), EltNo); - } else if (ShuffleVectorInst *SVI = dyn_cast(V)) { + } + + if (ShuffleVectorInst *SVI = dyn_cast(V)) { unsigned LHSWidth = cast(SVI->getOperand(0)->getType())->getNumElements(); unsigned InEl = getShuffleMask(SVI)[EltNo];