[llvm] [VPlan] Implement interleaving as VPlan-to-VPlan transform. (PR #95842)

Florian Hahn via llvm-commits llvm-commits at lists.llvm.org
Sun Sep 15 06:26:06 PDT 2024


================
@@ -492,13 +492,13 @@ Value *VPInstruction::generatePerPart(VPTransformState &State, unsigned Part) {
     return EVL;
   }
   case VPInstruction::CanonicalIVIncrementForPart: {
+    unsigned UF = getParent()->getPlan()->getUF();
     auto *IV = State.get(getOperand(0), VPIteration(0, 0));
-    if (Part == 0)
+    if (UF == 1)
       return IV;
----------------
fhahn wrote:

Fixed by adding a cleanup after unroll transform that removes `CanonicalIVIncrementForPart` with a single operand. Added an assert here.

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


More information about the llvm-commits mailing list