[llvm] [VPlan] Directly unroll VectorEndPointerRecipe (PR #172372)

Luke Lau via llvm-commits llvm-commits at lists.llvm.org
Mon Dec 15 21:38:30 PST 2025


================
@@ -2858,7 +2886,7 @@ static VPRecipeBase *optimizeMaskToEVL(VPValue *HeaderMask,
 
   if (match(&CurRecipe,
             m_MaskedLoad(m_VPValue(EndPtr), m_RemoveMask(HeaderMask, Mask))) &&
-      match(EndPtr, m_VecEndPtr(m_VPValue(Addr), m_Specific(&Plan->getVF()))) &&
+      match(EndPtr, m_VecEndPtr(m_VPValue(Addr), m_VPValue())) &&
----------------
lukel97 wrote:

You need to still match here for `-1 * (VF - 1)` otherwise it's not a correct transform. I guess you could add a helper matcher for that?

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


More information about the llvm-commits mailing list