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

Sam Tebbs via llvm-commits llvm-commits at lists.llvm.org
Wed Oct 30 10:25:27 PDT 2024


================
@@ -2266,6 +2275,38 @@ class VPReductionPHIRecipe : public VPHeaderPHIRecipe,
   bool isInLoop() const { return IsInLoop; }
 };
 
+/// A recipe for forming partial reductions. In the loop, an accumulator and
+/// vector operand are added together and passed to the next iteration as the
+/// next accumulator. After the loop body, the accumulator is reduced to a
+/// scalar value.
+class VPPartialReductionRecipe : public VPRecipeWithIRFlags {
+  unsigned Opcode;
+  Instruction &Reduction;
----------------
SamTebbs33 wrote:

Nothing actually, I think this is a relic from a past version. Thanks.

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


More information about the llvm-commits mailing list