[InstSimplify] Remove unused variable
authorDavid Majnemer <david.majnemer@gmail.com>
Tue, 18 Aug 2015 22:18:22 +0000 (22:18 +0000)
committerDavid Majnemer <david.majnemer@gmail.com>
Tue, 18 Aug 2015 22:18:22 +0000 (22:18 +0000)
No functionality change is intended.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@245369 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Analysis/InstructionSimplify.cpp

index db8639613fbee779e27e359ddcead9d7d9ba245d..ae9d6664fb86f992f46588e276ef738321ea74d2 100644 (file)
@@ -3574,13 +3574,9 @@ static Value *SimplifyExtractElementInst(Value *Vec, Value *Idx, const Query &,
 
   // 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;
 }