================
@@ -2661,23 +2666,32 @@ class LLVM_ABI_FOR_TEST VPInterleaveEVLRecipe final : 
public VPInterleaveBase {
   }
 };
 
-/// A recipe to represent inloop reduction operations, performing a reduction 
on
-/// a vector operand into a scalar value, and adding the result to a chain.
-/// The Operands are {ChainOp, VecOp, [Condition]}.
+/// A recipe to represent inloop, ordered or partial reduction operations. It
+/// performs a reduction on a vector operand into a scalar (vector in the case
+/// of a partial reduction) value, and adds the result to a chain. The Operands
+/// are {ChainOp, VecOp, [Condition]}.
 class LLVM_ABI_FOR_TEST VPReductionRecipe : public VPRecipeWithIRFlags {
   /// The recurrence kind for the reduction in question.
   RecurKind RdxKind;
   bool IsOrdered;
   /// Whether the reduction is conditional.
   bool IsConditional = false;
+  /// The scaling factor, relative to the VF, that this recipe's output is
+  /// divided by.
+  /// For outer-loop reductions this is equal to 1.
----------------
gbossu wrote:

I think I'm getting a bit confused. In which case do we get a 
`VPReductionRecipe` for "outer-loop" reductions? I thought it was only used 
when the reduction result was computed inside the loop (sometimes partially). 
For "outer-loop" reductions, don't we "widen everything" and compute the 
reduction result in the middle block?

https://github.com/llvm/llvm-project/pull/147513
_______________________________________________
llvm-branch-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits

Reply via email to