[PATCH] D75069: [LoopVectorizer] Inloop vector reductions

Florian Hahn via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed May 20 04:18:20 PDT 2020


fhahn added inline comments.


================
Comment at: llvm/lib/Analysis/IVDescriptors.cpp:812
+    if (LHS->getOpcode() == Opcode && L->contains(LHS->getParent()) &&
+        LHS->hasOneUse() &&
+        findPathToPhi(LHS, ReductionOperations, Opcode, Phi, L)) {
----------------
Ayal wrote:
> Looking for a chain of hasOneUse op's would be easier starting from the Phi and going downwards, until reaching LoopExitInstr?
> 
> Note that when extended to handle reductions with conditional bumps, some ops will have more than one use.
Instead of doing a recursive traversal, would it be simpler to just do the traversal iteratively, at least as long as we are only using at  a single use chain?


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

https://reviews.llvm.org/D75069





More information about the llvm-commits mailing list