[llvm] [LV, VP]VP intrinsics support for the Loop Vectorizer + adding new tail-folding mode using EVL. (PR #76172)

via llvm-commits llvm-commits at lists.llvm.org
Fri Feb 2 14:34:53 PST 2024


================
@@ -4733,6 +4755,36 @@ LoopVectorizationCostModel::computeMaxVF(ElementCount UserVF, unsigned UserIC) {
   // FIXME: look for a smaller MaxVF that does divide TC rather than masking.
   if (Legal->prepareToFoldTailByMasking()) {
     CanFoldTailByMasking = true;
+    if (getTailFoldingStyle() == TailFoldingStyle::None)
----------------
ayalz wrote:

Can the Style be None here - after having decided to fold the tail and successfully prepared for it? If not better assert so.

If Style is used multiple time better get it once and reuse it, as done elsewhere.

https://github.com/llvm/llvm-project/pull/76172


More information about the llvm-commits mailing list