[llvm] [VPlan] Use ResumePhi to create reduction resume phis. (PR #110004)

Florian Hahn via llvm-commits llvm-commits at lists.llvm.org
Sun Oct 13 14:00:27 PDT 2024


================
@@ -7467,23 +7467,31 @@ static void addRuntimeUnrollDisableMetaData(Loop *L) {
 }
 
 // Check if \p RedResult is a ComputeReductionResult instruction, and if it is
-// create a merge phi node for it.
-static void createAndCollectMergePhiForReduction(
-    VPInstruction *RedResult,
-    VPTransformState &State, Loop *OrigLoop, BasicBlock *LoopMiddleBlock,
-    bool VectorizingEpilogue) {
+// create a merge phi node for it and add incoming values from the main vector
+// loop.
+static void updateAndCollectMergePhiForReductionForEpilogueVectorization(
+    VPInstruction *RedResult, VPTransformState &State, Loop *OrigLoop,
+    BasicBlock *LoopMiddleBlock, bool VectorizingEpilogue) {
   if (!RedResult ||
----------------
fhahn wrote:

Done, thanks!

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


More information about the llvm-commits mailing list