[llvm] [LV] Pass symbolic VF to CalculateTripCountMinusVF and CanonicalIVIncrementForPart (NFC) (PR #180542)

Florian Hahn via llvm-commits llvm-commits at lists.llvm.org
Fri Feb 13 03:08:22 PST 2026


================
@@ -1982,7 +1982,7 @@ static bool tryToReplaceALMWithWideALM(VPlan &Plan, ElementCount VF,
     uint64_t Part;
     if (match(Index,
               m_VPInstruction<VPInstruction::CanonicalIVIncrementForPart>(
-                  m_VPValue(), m_ConstantInt(Part))))
+                  m_VPValue(), m_Mul(m_VPValue(), m_ConstantInt(Part)))))
       Phis[Part] = Phi;
     else
       // Anything other than a CanonicalIVIncrementForPart is part 0
----------------
fhahn wrote:

it would probably be good to assert here that `Index` is not a `CanonicalIVIncrementForPart` VPInstruction (or has 0 as last part operand), to prevent cases where the multiply above has been folded to some other expression)

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


More information about the llvm-commits mailing list