1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2025-02-01 05:01:59 +01:00

[NFC] Remove shadowed variable in InnerLoopVectorizer::createInductionVariable

Avoid creating a IRBuilder stack variable with the same name as the
class member.
This commit is contained in:
David Sherwood 2021-06-29 14:28:49 +01:00
parent b0c708ce07
commit 5545465662

View File

@ -3071,7 +3071,13 @@ PHINode *InnerLoopVectorizer::createInductionVariable(Loop *L, Value *Start,
if (!Latch)
Latch = Header;
IRBuilder<> Builder(&*Header->getFirstInsertionPt());
// 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());
Instruction *OldInst = getDebugLocFromInstOrOperands(OldInduction);
setDebugLocFromInst(Builder, OldInst);
auto *Induction = Builder.CreatePHI(Start->getType(), 2, "index");