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

Benjamin Maxwell via llvm-commits llvm-commits at lists.llvm.org
Wed Aug 5 01:46:20 PDT 2026


================
@@ -785,20 +788,25 @@ Value *VPInstruction::generate(VPTransformState &State) {
     return Builder.CreateSelectFMF(Cond, Op1, Op2, getFastMathFlagsOrNone(),
                                    Name);
   }
-  case VPInstruction::ActiveLaneMask: {
+  case VPInstruction::ActiveLaneMask:
+  case VPInstruction::WideActiveLaneMask: {
     // Get first lane of vector induction variable.
     Value *VIVElem0 = State.get(getOperand(0), VPLane(0));
     // Get the original loop tripcount.
     Value *ScalarTC = State.get(getOperand(1), VPLane(0));
 
+    unsigned Multiplier =
+        getOpcode() == VPInstruction::ActiveLaneMask
----------------
MacDue wrote:

very nit: I'd maybe swap this check to `== WideActiveLaneMask` (since that's the case with the extra operand).

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


More information about the llvm-commits mailing list