[llvm] 8b48223 - Recommit "[VPlan] Remove uneeded needsVectorIV check."
Florian Hahn via llvm-commits
llvm-commits at lists.llvm.org
Wed May 4 02:54:05 PDT 2022
Author: Florian Hahn
Date: 2022-05-04T10:53:42+01:00
New Revision: 8b48223447311af8b3022697dd58858e1ce6975f
URL: https://github.com/llvm/llvm-project/commit/8b48223447311af8b3022697dd58858e1ce6975f
DIFF: https://github.com/llvm/llvm-project/commit/8b48223447311af8b3022697dd58858e1ce6975f.diff
LOG: Recommit "[VPlan] Remove uneeded needsVectorIV check."
This reverts commit f4e1eaa3755a13f85696be3b74b387122b74a558.
The patch was originally reverted because it uncovered an issue that has
now been fixed in 0ef8ca6d88aa7e4abc.
Added:
Modified:
llvm/lib/Transforms/Vectorize/VPlanTransforms.cpp
Removed:
################################################################################
diff --git a/llvm/lib/Transforms/Vectorize/VPlanTransforms.cpp b/llvm/lib/Transforms/Vectorize/VPlanTransforms.cpp
index f4d2af2d9de39..e8f2e2f291aec 100644
--- a/llvm/lib/Transforms/Vectorize/VPlanTransforms.cpp
+++ b/llvm/lib/Transforms/Vectorize/VPlanTransforms.cpp
@@ -429,15 +429,8 @@ void VPlanTransforms::optimizeInductions(VPlan &Plan, ScalarEvolution &SE) {
IV->getStartValue(), Step, TruncI ? TruncI->getType() : nullptr);
HeaderVPBB->insert(Steps, HeaderVPBB->getFirstNonPhi());
- // If there are no vector users of IV, simply update all users to use Step
- // instead.
- if (!IV->needsVectorIV()) {
- IV->replaceAllUsesWith(Steps);
- continue;
- }
-
- // Otherwise only update scalar users of IV to use Step instead. Use
- // SetVector to ensure the list of users doesn't contain duplicates.
+ // Update scalar users of IV to use Step instead. Use SetVector to ensure
+ // the list of users doesn't contain duplicates.
SetVector<VPUser *> Users(IV->user_begin(), IV->user_end());
for (VPUser *U : Users) {
VPRecipeBase *R = cast<VPRecipeBase>(U);
More information about the llvm-commits
mailing list