Revert "[NFC] Remove shadowed variable in InnerLoopVectorizer::createInductionVariable"

This reverts commit 9dde514162.
This commit is contained in:
David Sherwood 2021-06-29 15:20:11 +01:00
parent c3d3defd11
commit 9de63367d8
1 changed files with 1 additions and 7 deletions

View File

@ -3071,13 +3071,7 @@ PHINode *InnerLoopVectorizer::createInductionVariable(Loop *L, Value *Start,
if (!Latch)
Latch = Header;
// Set the Builder to a valid Block pointer as the existing one could get
// deleted below.
Builder.SetInsertPoint(&*LoopVectorBody->getFirstInsertionPt());
IRBuilder<>::InsertPointGuard Guard(Builder);
Builder.SetInsertPoint(&*Header->getFirstInsertionPt());
IRBuilder<> Builder(&*Header->getFirstInsertionPt());
Instruction *OldInst = getDebugLocFromInstOrOperands(OldInduction);
setDebugLocFromInst(Builder, OldInst);
auto *Induction = Builder.CreatePHI(Start->getType(), 2, "index");