[llvm] r245369 - [InstSimplify] Remove unused variable

David Majnemer via llvm-commits llvm-commits at lists.llvm.org
Tue Aug 18 15:18:22 PDT 2015


Author: majnemer
Date: Tue Aug 18 17:18:22 2015
New Revision: 245369

URL: http://llvm.org/viewvc/llvm-project?rev=245369&view=rev
Log:
[InstSimplify] Remove unused variable

No functionality change is intended.

Modified:
    llvm/trunk/lib/Analysis/InstructionSimplify.cpp

Modified: llvm/trunk/lib/Analysis/InstructionSimplify.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Analysis/InstructionSimplify.cpp?rev=245369&r1=245368&r2=245369&view=diff
==============================================================================
--- llvm/trunk/lib/Analysis/InstructionSimplify.cpp (original)
+++ llvm/trunk/lib/Analysis/InstructionSimplify.cpp Tue Aug 18 17:18:22 2015
@@ -3574,13 +3574,9 @@ static Value *SimplifyExtractElementInst
 
   // If extracting a specified index from the vector, see if we can recursively
   // find a previously computed scalar that was inserted into the vector.
-  if (auto *IdxC = dyn_cast<ConstantInt>(Idx)) {
-    unsigned IndexVal = IdxC->getZExtValue();
-    unsigned VectorWidth = Vec->getType()->getVectorNumElements();
-
-    if (Value *Elt = findScalarElement(Vec, IndexVal))
+  if (auto *IdxC = dyn_cast<ConstantInt>(Idx))
+    if (Value *Elt = findScalarElement(Vec, IdxC->getZExtValue()))
       return Elt;
-  }
 
   return nullptr;
 }




More information about the llvm-commits mailing list