[llvm] c34d049 - [LV] Re-use existing NewInsertionPoint variable for insertion (NFCI).
Florian Hahn via llvm-commits
llvm-commits at lists.llvm.org
Mon Aug 21 07:25:40 PDT 2023
Author: Florian Hahn
Date: 2023-08-21T15:21:29+01:00
New Revision: c34d049706e69cb61d05ce21ded2ac7ecef9f45f
URL: https://github.com/llvm/llvm-project/commit/c34d049706e69cb61d05ce21ded2ac7ecef9f45f
DIFF: https://github.com/llvm/llvm-project/commit/c34d049706e69cb61d05ce21ded2ac7ecef9f45f.diff
LOG: [LV] Re-use existing NewInsertionPoint variable for insertion (NFCI).
Split off independent suggestion from D157037.
Added:
Modified:
llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
Removed:
################################################################################
diff --git a/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp b/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
index b8221595fe7391..c2b0f15268d7a1 100644
--- a/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
+++ b/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
@@ -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);
More information about the llvm-commits
mailing list