[PATCH] D123720: [VPlan] Replace use of needsVectorIV with VPlan user check.

Florian Hahn via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Apr 28 08:30:18 PDT 2022


This revision was landed with ongoing or failed builds.
This revision was automatically updated to reflect the committed changes.
Closed by commit rG43842b887e0a: [VPlan] Remove uneeded needsVectorIV check. (authored by fhahn).

Changed prior to commit:
  https://reviews.llvm.org/D123720?vs=422621&id=425795#toc

Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D123720/new/

https://reviews.llvm.org/D123720

Files:
  llvm/lib/Transforms/Vectorize/VPlanTransforms.cpp


Index: llvm/lib/Transforms/Vectorize/VPlanTransforms.cpp
===================================================================
--- llvm/lib/Transforms/Vectorize/VPlanTransforms.cpp
+++ llvm/lib/Transforms/Vectorize/VPlanTransforms.cpp
@@ -429,15 +429,7 @@
         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);


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D123720.425795.patch
Type: text/x-patch
Size: 1005 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220428/07340b7f/attachment.bin>


More information about the llvm-commits mailing list