[llvm] [VPlan] Improve code in VPInstruction::generate (NFC) (PR #169470)

Ramkumar Ramachandra via llvm-commits llvm-commits at lists.llvm.org
Tue Nov 25 03:29:29 PST 2025


================
@@ -900,7 +897,7 @@ Value *VPInstruction::generate(VPTransformState &State) {
     // each part of the reduction.
     unsigned UF = getNumOperands() - 1;
     VectorParts RdxParts(UF);
-    for (unsigned Part = 0; Part < UF; ++Part)
+    for (unsigned Part : seq<unsigned>(UF))
----------------
artagnon wrote:

seq is already used in other parts of VPlanRecipes -- we can eventually improve other files, but VPlanRecipes is where it is most useful.

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


More information about the llvm-commits mailing list