From 53ff0bbb0ae96b738c157c1dddb0a7d4a6869feb Mon Sep 17 00:00:00 2001 From: David Majnemer Date: Tue, 18 Aug 2015 22:18:22 +0000 Subject: [PATCH] [InstSimplify] Remove unused variable 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 | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/lib/Analysis/InstructionSimplify.cpp b/lib/Analysis/InstructionSimplify.cpp index db8639613fb..ae9d6664fb8 100644 --- a/lib/Analysis/InstructionSimplify.cpp +++ b/lib/Analysis/InstructionSimplify.cpp @@ -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(Idx)) { - unsigned IndexVal = IdxC->getZExtValue(); - unsigned VectorWidth = Vec->getType()->getVectorNumElements(); - - if (Value *Elt = findScalarElement(Vec, IndexVal)) + if (auto *IdxC = dyn_cast(Idx)) + if (Value *Elt = findScalarElement(Vec, IdxC->getZExtValue())) return Elt; - } return nullptr; }