[PATCH] D146199: [LoopVectorize] Don't tail-fold for scalable VFs when there is no scalar tail

David Sherwood via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Mar 16 10:25:06 PDT 2023


david-arm added a subscriber: paulwalker-arm.
david-arm added a comment.

Hi @paulwalker-arm,



================
Comment at: llvm/lib/Transforms/Vectorize/LoopVectorize.cpp:5173
+    } else
+      MaxPossibleVF = 1; // Stick with tail-folding for now.
+  }
----------------
sdesmalen wrote:
> nit: This default is already set on line 5155, so there's no need to set it again here?
I don't think we can because this could have been set to something greater than 1 for the fixed-width case, since for scalable vectorisation we usually have both a max fixed-width VF and a max scalable VF. As you say above, we're kind of taking the max of the fixed-width and scalable VFs, but only if safe to do so for scalable VFs. I agree the logic is kind of awkward, but it's not immediately obvious to me how to make it better?


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

https://reviews.llvm.org/D146199



More information about the llvm-commits mailing list