[PATCH] D98435: [LoopVectorize] Add strict in-order reduction support for fixed-width vectorization

David Sherwood via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Mar 24 02:32:27 PDT 2021


david-arm added inline comments.


================
Comment at: llvm/lib/Transforms/Vectorize/LoopVectorize.cpp:4260
+    if (IsInLoopReductionPhi && useOrderedReductions(RdxDesc) &&
+        State.VF.getKnownMinValue() > 1)
+      Val = State.get(State.Plan->getVPValue(LoopVal), UF - 1);
----------------
dmgreen wrote:
> Can this use isScalar(), or is it to handle scalable single items too?
> 
> We generate multiple phi's, but only use the first one? The others get DCE'd?
Yes, I think in this case we can just use

  State.VF.isVector()

since that also covers the case when VF=(1,scalable)


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

https://reviews.llvm.org/D98435



More information about the llvm-commits mailing list