File tree 2 files changed +9
-2
lines changed
llvm/lib/Transforms/Vectorize
2 files changed +9
-2
lines changed Original file line number Diff line number Diff line change @@ -120,6 +120,13 @@ class VPBuilder {
120
120
InsertPt = IP;
121
121
}
122
122
123
+ // / This specifies that created instructions should be inserted at the
124
+ // / specified point.
125
+ void setInsertPoint (VPRecipeBase *IP) {
126
+ BB = IP->getParent ();
127
+ InsertPt = IP->getIterator ();
128
+ }
129
+
123
130
// / Create an N-ary operation with \p Opcode, \p Operands and set \p Inst as
124
131
// / its underlying Instruction.
125
132
VPValue *createNaryOp (unsigned Opcode, ArrayRef<VPValue *> Operands,
Original file line number Diff line number Diff line change @@ -9133,7 +9133,7 @@ void LoopVectorizationPlanner::adjustRecipesForReductions(
9133
9133
VPValue *CondOp = nullptr ;
9134
9134
if (CM.blockNeedsPredicationForAnyReason (BB)) {
9135
9135
VPBuilder::InsertPointGuard Guard (Builder);
9136
- Builder.setInsertPoint (LinkVPBB, CurrentLink-> getIterator () );
9136
+ Builder.setInsertPoint (CurrentLink);
9137
9137
CondOp = RecipeBuilder.createBlockInMask (BB, *Plan);
9138
9138
}
9139
9139
@@ -9153,7 +9153,7 @@ void LoopVectorizationPlanner::adjustRecipesForReductions(
9153
9153
// and the live-out instruction of each reduction, at the beginning of the
9154
9154
// dedicated latch block.
9155
9155
if (CM.foldTailByMasking ()) {
9156
- Builder.setInsertPoint (LatchVPBB, LatchVPBB->begin ());
9156
+ Builder.setInsertPoint (&* LatchVPBB->begin ());
9157
9157
for (VPRecipeBase &R :
9158
9158
Plan->getVectorLoopRegion ()->getEntryBasicBlock ()->phis ()) {
9159
9159
VPReductionPHIRecipe *PhiR = dyn_cast<VPReductionPHIRecipe>(&R);
You can’t perform that action at this time.
0 commit comments