Skip to content

Commit f9120dc

Browse files
committed
[VPlan] Make sure vector trip count is ready for prepareToExecute (NFC)
Split off from #112145. This ensures that getOrCreateVectorTripCount creates the trip count as needed when induction resume value creation is moved to VPlan and no longer creates the vector trip count early.
1 parent df0b34c commit f9120dc

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

llvm/lib/Transforms/Vectorize/LoopVectorize.cpp

+3-2
Original file line numberDiff line numberDiff line change
@@ -7827,8 +7827,9 @@ DenseMap<const SCEV *, Value *> LoopVectorizationPlanner::executePlan(
78277827
//===------------------------------------------------===//
78287828

78297829
// 2. Copy and widen instructions from the old loop into the new loop.
7830-
BestVPlan.prepareToExecute(ILV.getTripCount(),
7831-
ILV.getOrCreateVectorTripCount(nullptr), State);
7830+
BestVPlan.prepareToExecute(
7831+
ILV.getTripCount(),
7832+
ILV.getOrCreateVectorTripCount(ILV.LoopVectorPreHeader), State);
78327833

78337834
BestVPlan.execute(&State);
78347835

0 commit comments

Comments
 (0)