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

David Sherwood via llvm-commits llvm-commits at lists.llvm.org
Wed Aug 5 02:41:13 PDT 2026


================
@@ -1411,9 +1430,13 @@ InstructionCost VPInstruction::computeCost(ElementCount VF,
         TargetTransformInfo::SK_Splice, cast<VectorType>(VectorTy),
         cast<VectorType>(VectorTy), {}, Ctx.CostKind, -1);
   }
-  case VPInstruction::ActiveLaneMask: {
+  case VPInstruction::ActiveLaneMask:
+  case VPInstruction::WideActiveLaneMask: {
     Type *ArgTy = getOperand(0)->getScalarType();
-    unsigned Multiplier = cast<VPConstantInt>(getOperand(2))->getZExtValue();
+    unsigned Multiplier =
+        getOpcode() == VPInstruction::ActiveLaneMask
----------------
david-arm wrote:

nit: Perhaps use uint64_t to match the return type of getZExtValue?

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


More information about the llvm-commits mailing list