[llvm-commits] [llvm] r92684 - /llvm/trunk/lib/Transforms/InstCombine/InstCombineVectorOps.cpp

Chris Lattner sabre at nondot.org
Mon Jan 4 21:42:16 PST 2010


Author: lattner
Date: Mon Jan  4 23:42:08 2010
New Revision: 92684

URL: http://llvm.org/viewvc/llvm-project?rev=92684&view=rev
Log:
reduce indentation

Modified:
    llvm/trunk/lib/Transforms/InstCombine/InstCombineVectorOps.cpp

Modified: llvm/trunk/lib/Transforms/InstCombine/InstCombineVectorOps.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/InstCombine/InstCombineVectorOps.cpp?rev=92684&r1=92683&r2=92684&view=diff

==============================================================================
--- llvm/trunk/lib/Transforms/InstCombine/InstCombineVectorOps.cpp (original)
+++ llvm/trunk/lib/Transforms/InstCombine/InstCombineVectorOps.cpp Mon Jan  4 23:42:08 2010
@@ -86,11 +86,12 @@
   
   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 @@
     // 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];





More information about the llvm-commits mailing list