[llvm] [VPlan] Introduce ComputeReductionResult VPInstruction opcode. (PR #70253)

via llvm-commits llvm-commits at lists.llvm.org
Mon Jan 1 01:56:41 PST 2024


================
@@ -7585,7 +7393,36 @@ static void AddRuntimeUnrollDisableMetaData(Loop *L) {
   }
 }
 
-SCEV2ValueTy LoopVectorizationPlanner::executePlan(
+// Check if RedResult is a CompueReductionResult instruction, and if it is
+// add it to \p ReductionResumeValues with the merge phi node for it.
+static void collectMergePhiForReduction(
----------------
ayalz wrote:

Would it be better to have collectMergePhiForReduction(), in addition to collecting the bc.merge.rdx phi, also take care of generating it inside the scalar preheader - a block that is yet to be modeled in VPlan? Thereby letting the new ComputeReductionResult recipe, placed inside the middle block, take care of generating code there only?

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


More information about the llvm-commits mailing list