Skip to content

Commit

Permalink
Revert "[NFC] Remove shadowed variable in InnerLoopVectorizer::create…
Browse files Browse the repository at this point in the history
…InductionVariable"

This reverts commit 9dde514.
  • Loading branch information
david-arm committed Jun 29, 2021
1 parent c3d3def commit 9de6336
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
Expand Up @@ -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");
Expand Down

0 comments on commit 9de6336

Please sign in to comment.