[llvm] [VPlan] Materialize VectorTripCount in narrowInterleaveGroups. (PR #182146)

Ramkumar Ramachandra via llvm-commits llvm-commits at lists.llvm.org
Mon Mar 2 06:37:14 PST 2026


================
@@ -5424,6 +5431,16 @@ VPlanTransforms::narrowInterleaveGroups(VPlan &Plan,
   if (StoreGroups.empty())
     return nullptr;
 
+  // Determine if a scalar epilogue is required. The middle block has exactly 2
+  // successors in the normal case, and 1 successor when a scalar epilogue must
+  // execute (unconditional branch to scalar preheader).
+  bool RequiresScalarEpilogue =
----------------
artagnon wrote:

Hm, I wonder what the difference between this and CM.requiresScalarEpilogue is? Can we just guard the call to materializeFactors with CM.requiresScalarEpilogue?

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


More information about the llvm-commits mailing list