[llvm] [VPlan] Expand VPWidenPointerInductionRecipe into separate recipes (PR #148274)
Luke Lau via llvm-commits
llvm-commits at lists.llvm.org
Tue Jul 22 07:30:06 PDT 2025
================
@@ -2675,6 +2676,106 @@ expandVPWidenIntOrFpInduction(VPWidenIntOrFpInductionRecipe *WidenIVR,
WidenIVR->replaceAllUsesWith(WidePHI);
}
+/// Expand a VPWidenPointerInductionRecipe into executable recipes, for the
+/// initial value, phi and backedge value. In the following example:
+///
+/// <x1> vector loop: {
+/// vector.body:
+/// EMIT ir<%ptr.iv> = WIDEN-POINTER-INDUCTION %start, %step, %vf
+/// ...
+/// EMIT branch-on-count ...
+/// }
+///
+/// WIDEN-POINTER-INDUCTION will get expanded to:
+///
+/// <x1> vector loop: {
+/// vector.body:
+/// EMIT-SCALAR %pointer.phi = phi %start, %ptr.ind
+/// EMIT %mul = mul %stepvector, %step
+/// EMIT %vector.gep = ptradd %pointer.phi, %add
----------------
lukel97 wrote:
Whoops that's a typo, fixed in 50454c5cdb12fce7771db4e2350a8d4e5051de8e thanks
https://github.com/llvm/llvm-project/pull/148274
More information about the llvm-commits
mailing list