[llvm] [LV] Use wide lane masks as the canonical form when tail-folding & interleaving (PR #209484)

Kerry McLaughlin via llvm-commits llvm-commits at lists.llvm.org
Wed Aug 5 05:41:13 PDT 2026


================
@@ -1232,8 +1232,16 @@ class LLVM_ABI_FOR_TEST VPInstruction : public VPRecipeWithIRFlags,
     // Creates a mask where each lane is active (true) whilst the current
     // counter (first operand + index) is less than the second operand. i.e.
     //    mask[i] = icmpt ult (op0 + i), op1
-    // The size of the mask returned is VF * Multiplier (UF, third op).
+    // The size of the mask returned is VF.
+    // When unrolled, ActiveLaneMask is duplicated.
----------------
kmclaughlin-arm wrote:

`WideActiveLaneMask` is only the canonical form for unrolled, tail-folded loops if the style is `DataAndControlFlow`. For other styles, we still use `ActiveLaneMask` and will duplicate the mask (strict-fadd-interleave-only.ll does test this scenario, although the intrinsic is replaced with icmp because the VF is scalar). I've tried to rewrite the comment a bit to make this clearer though.

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


More information about the llvm-commits mailing list