]> granicus.if.org Git - llvm/commitdiff
[SLP] nullptr'ize initial value in `findBuildAggregate()`, NFC.
authorAlexey Bataev <a.bataev@hotmail.com>
Mon, 20 Feb 2017 08:04:11 +0000 (08:04 +0000)
committerAlexey Bataev <a.bataev@hotmail.com>
Mon, 20 Feb 2017 08:04:11 +0000 (08:04 +0000)
Initial value of V is sett nullptr, as it is not used.

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

lib/Transforms/Vectorize/SLPVectorizer.cpp

index 5c95f88a3f98eba3141143491a87ddb5f195c838..bab63c2fff57abc0d258461ad2d2a644cd1bef3a 100644 (file)
@@ -4614,7 +4614,7 @@ static bool findBuildVector(InsertElementInst *FirstInsertElem,
 static bool findBuildAggregate(InsertValueInst *IV,
                                SmallVectorImpl<Value *> &BuildVector,
                                SmallVectorImpl<Value *> &BuildVectorOpds) {
-  Value *V = IV;
+  Value *V = nullptr;
   do {
     BuildVector.push_back(IV);
     BuildVectorOpds.push_back(IV->getInsertedValueOperand());