[llvm] [LoopVectorizer] Add support for partial reductions (PR #92418)

Florian Hahn via llvm-commits llvm-commits at lists.llvm.org
Wed Dec 18 12:40:27 PST 2024


================
@@ -7575,6 +7575,10 @@ static bool planContainsAdditionalSimplifications(VPlan &Plan,
         }
         continue;
       }
+      // The VPlan-based cost model is more accurate for partial reduction and
+      // comparing against the legacy cost isn't desirable.
+      if (dyn_cast<VPPartialReductionRecipe>(&R))
----------------
fhahn wrote:

```suggestion
      if (isa<VPPartialReductionRecipe>(&R))
```

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


More information about the llvm-commits mailing list