[PATCH] D120828: [LV] Create & use VPScalarIVSteps for all scalar users.

Florian Hahn via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Mar 9 13:00:50 PST 2022


fhahn marked an inline comment as done.
fhahn added inline comments.


================
Comment at: llvm/lib/Transforms/Vectorize/VPlanTransforms.cpp:424
+    if (!IV->needsVectorIV()) {
+      IV->replaceAllUsesWith(Steps) continue;
+    }
----------------
Ayal wrote:
> 'continue' on same line?
> 
> Given that we're iterating over all users below to find those that use scalars, perhaps compute if a vector IV and scalar IV are needed, removing needsVectorIV() and needsScalarIV()? Along with what they entail...
> 'continue' on same line?

Fixed, thanks!

> Given that we're iterating over all users below to find those that use scalars, perhaps compute if a vector IV and scalar IV are needed, removing needsVectorIV() and needsScalarIV()? Along with what they entail...

I think that's a good follow-up. There's another user of `needsVectorIV` outside the function, so I think it would be good to make this change separately.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D120828



More information about the llvm-commits mailing list