[llvm] [LV] Bundle partial reductions inside VPExpressionRecipe (PR #147302)

Sander de Smalen via llvm-commits llvm-commits at lists.llvm.org
Thu Oct 2 03:53:53 PDT 2025


================
@@ -2881,12 +2902,15 @@ void VPExpressionRecipe::print(raw_ostream &O, const Twine &Indent,
   O << " = ";
   auto *Red = cast<VPReductionRecipe>(ExpressionRecipes.back());
   unsigned Opcode = RecurrenceDescriptor::getOpcode(Red->getRecurrenceKind());
+  bool IsPartialReduction = isa<VPPartialReductionRecipe>(Red);
 
   switch (ExpressionType) {
   case ExpressionTypes::ExtendedReduction: {
     getOperand(1)->printAsOperand(O, SlotTracker);
-    O << " +";
-    O << " reduce." << Instruction::getOpcodeName(Opcode) << " (";
+    O << " + ";
+    if (IsPartialReduction)
+      O << "partial.";
----------------
sdesmalen-arm wrote:

nit: `O << " + " << (IsPartialReduction ? "partial." : "") << "reduce.";

(same suggestion on line 2929 and 2958)

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


More information about the llvm-commits mailing list