summaryrefslogtreecommitdiff
path: root/lib/Transforms/InstCombine/InstCombineVectorOps.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2010-01-05 05:42:08 +0000
committerChris Lattner <sabre@nondot.org>2010-01-05 05:42:08 +0000
commitd5da27186350345794b82f036d75f6d1e9bfbbbd (patch)
tree151491e55bfc859e186e04f19a85f66eca3b3954 /lib/Transforms/InstCombine/InstCombineVectorOps.cpp
parentb8a5cecd6bc74d6c1c256263f857f79f383e53bd (diff)
downloadllvm-d5da27186350345794b82f036d75f6d1e9bfbbbd.tar.gz
llvm-d5da27186350345794b82f036d75f6d1e9bfbbbd.tar.bz2
llvm-d5da27186350345794b82f036d75f6d1e9bfbbbd.tar.xz
reduce indentation
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92684 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Transforms/InstCombine/InstCombineVectorOps.cpp')
-rw-r--r--lib/Transforms/InstCombine/InstCombineVectorOps.cpp11
1 files changed, 7 insertions, 4 deletions
diff --git a/lib/Transforms/InstCombine/InstCombineVectorOps.cpp b/lib/Transforms/InstCombine/InstCombineVectorOps.cpp
index 9977b830f3..f11f557888 100644
--- a/lib/Transforms/InstCombine/InstCombineVectorOps.cpp
+++ b/lib/Transforms/InstCombine/InstCombineVectorOps.cpp
@@ -86,11 +86,12 @@ static Value *FindScalarElement(Value *V, unsigned EltNo) {
if (isa<UndefValue>(V))
return UndefValue::get(PTy->getElementType());
- else if (isa<ConstantAggregateZero>(V))
+ if (isa<ConstantAggregateZero>(V))
return Constant::getNullValue(PTy->getElementType());
- else if (ConstantVector *CP = dyn_cast<ConstantVector>(V))
+ if (ConstantVector *CP = dyn_cast<ConstantVector>(V))
return CP->getOperand(EltNo);
- else if (InsertElementInst *III = dyn_cast<InsertElementInst>(V)) {
+
+ if (InsertElementInst *III = dyn_cast<InsertElementInst>(V)) {
// If this is an insert to a variable element, we don't know what it is.
if (!isa<ConstantInt>(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<ShuffleVectorInst>(V)) {
+ }
+
+ if (ShuffleVectorInst *SVI = dyn_cast<ShuffleVectorInst>(V)) {
unsigned LHSWidth =
cast<VectorType>(SVI->getOperand(0)->getType())->getNumElements();
unsigned InEl = getShuffleMask(SVI)[EltNo];