Skip to content

Commit 43842b8

Browse files
committed
[VPlan] Remove uneeded needsVectorIV check.
Remove one of the last remaining uses of ::needsVectorIV, preparing for its removal. Now that usesScalars is available and based on the information explicit in VPlan, there is no need to use the pre-computed needsVectorIV. Reviewed By: Ayal Differential Revision: https://reviews.llvm.org/D123720
1 parent 50d648b commit 43842b8

File tree

1 file changed

+1
-9
lines changed

1 file changed

+1
-9
lines changed

llvm/lib/Transforms/Vectorize/VPlanTransforms.cpp

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -429,15 +429,7 @@ void VPlanTransforms::optimizeInductions(VPlan &Plan, ScalarEvolution &SE) {
429429
IV->getStartValue(), Step, TruncI ? TruncI->getType() : nullptr);
430430
HeaderVPBB->insert(Steps, HeaderVPBB->getFirstNonPhi());
431431

432-
// If there are no vector users of IV, simply update all users to use Step
433-
// instead.
434-
if (!IV->needsVectorIV()) {
435-
IV->replaceAllUsesWith(Steps);
436-
continue;
437-
}
438-
439-
// Otherwise only update scalar users of IV to use Step instead. Use
440-
// SetVector to ensure the list of users doesn't contain duplicates.
432+
// Update scalar users of IV to use Step instead. Use SetVector to ensure the list of users doesn't contain duplicates.
441433
SetVector<VPUser *> Users(IV->user_begin(), IV->user_end());
442434
for (VPUser *U : Users) {
443435
VPRecipeBase *R = cast<VPRecipeBase>(U);

0 commit comments

Comments
 (0)