Skip to content

Commit

Permalink
[LV] Re-use existing NewInsertionPoint variable for insertion (NFCI).
Browse files Browse the repository at this point in the history
Split off independent suggestion from D157037.
  • Loading branch information
fhahn committed Aug 21, 2023
1 parent 262520a commit c34d049
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
Expand Up @@ -8023,7 +8023,7 @@ VPValue *VPRecipeBuilder::createBlockInMask(BasicBlock *BB, VPlan &Plan) {
VPBasicBlock *HeaderVPBB = Plan.getVectorLoopRegion()->getEntryBasicBlock();
auto NewInsertionPoint = HeaderVPBB->getFirstNonPhi();
auto *IV = new VPWidenCanonicalIVRecipe(Plan.getCanonicalIV());
HeaderVPBB->insert(IV, HeaderVPBB->getFirstNonPhi());
HeaderVPBB->insert(IV, NewInsertionPoint);

VPBuilder::InsertPointGuard Guard(Builder);
Builder.setInsertPoint(HeaderVPBB, NewInsertionPoint);
Expand Down

0 comments on commit c34d049

Please sign in to comment.