[llvm] [LV] Use VPReductionRecipe for partial reductions (PR #144908)

Sander de Smalen via llvm-commits llvm-commits at lists.llvm.org
Fri Jun 20 08:39:02 PDT 2025


================
@@ -2201,6 +2200,8 @@ class VPReductionPHIRecipe : public VPHeaderPHIRecipe,
         RdxDesc(RdxDesc), IsInLoop(IsInLoop), IsOrdered(IsOrdered),
         VFScaleFactor(VFScaleFactor) {
     assert((!IsOrdered || IsInLoop) && "IsOrdered requires IsInLoop");
+    assert(((!IsInLoop && !IsOrdered) || VFScaleFactor == 0) &&
----------------
sdesmalen-arm wrote:

Because VFScaleFactor now encodes whether it is an inloop reduction or not, it's possible to remove `IsInLoop` now. Given that we're changing the interface, probably best to make that change in this PR.

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


More information about the llvm-commits mailing list