[NFC] Remove shadowed variable in InnerLoopVectorizer::createInductionVariable
authorDavid Sherwood <david.sherwood@arm.com>
Mon, 28 Jun 2021 15:40:19 +0000 (16:40 +0100)
committerDavid Sherwood <david.sherwood@arm.com>
Tue, 29 Jun 2021 08:14:35 +0000 (09:14 +0100)
Avoid creating a IRBuilder stack variable with the same name as the
class member.

llvm/lib/Transforms/Vectorize/LoopVectorize.cpp

index e609fdd..3988d2f 100644 (file)
@@ -3071,7 +3071,9 @@ PHINode *InnerLoopVectorizer::createInductionVariable(Loop *L, Value *Start,
   if (!Latch)
     Latch = Header;
 
-  IRBuilder<> Builder(&*Header->getFirstInsertionPt());
+  IRBuilder<>::InsertPointGuard Guard(Builder);
+  Builder.SetInsertPoint(&*Header->getFirstInsertionPt());
+
   Instruction *OldInst = getDebugLocFromInstOrOperands(OldInduction);
   setDebugLocFromInst(Builder, OldInst);
   auto *Induction = Builder.CreatePHI(Start->getType(), 2, "index");