[llvm] [VPlan] Run narrowInterleaveGroups during general VPlan optimizations. (PR #149706)

Florian Hahn via llvm-commits llvm-commits at lists.llvm.org
Tue Sep 2 13:48:21 PDT 2025


================
@@ -8336,6 +8333,14 @@ void LoopVectorizationPlanner::buildVPlansWithVPRecipes(ElementCount MinVF,
       if (CM.foldTailWithEVL() && !HasScalarVF)
         VPlanTransforms::runPass(VPlanTransforms::addExplicitVectorLength,
                                  *Plan, CM.getMaxSafeElements());
+
+      if (auto P = VPlanTransforms::narrowInterleaveGroups(
+              *Plan,
+              TTI.getRegisterBitWidth(
+                  TargetTransformInfo::RGK_FixedWidthVector),
----------------
fhahn wrote:

At the moment, I think for all cases in practice, known min value for the fixed and scalable vectors is the same (128 on AArch64). 

But they could be different in theory, so I moved retrieving the bitwidth into `narrowInterleaveGroups`,  depending on whether the VF we are trying to optimize is scalable or fixed.

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


More information about the llvm-commits mailing list