[llvm] [VPlan] Model FOR resume value extraction in VPlan. (PR #93396)

Florian Hahn via llvm-commits llvm-commits at lists.llvm.org
Tue Jun 4 14:23:06 PDT 2024


================
@@ -855,6 +904,13 @@ bool VPlanTransforms::adjustFixedOrderRecurrences(VPlan &Plan,
         {}, "vector.recur.extract.for.phi"));
     RecurSplice->replaceUsesWithIf(
         Result, [](VPUser &U, unsigned) { return isa<VPLiveOut>(&U); });
+    auto *Resume = MiddleBuilder.createNaryOp(
+        VPInstruction::ExtractFromEnd,
+        {FOR->getBackedgeValue(),
+         Plan.getOrAddLiveIn(ConstantInt::get(IntTy, 1))},
+        {}, "vector.recur.extract");
+    // Introduce VPUsers modeling the exit values.
----------------
fhahn wrote:

Updated both the comment + commit message, thanks! Not sure how to better keep the distinction, but I added comment where we generate the extract for the exit.

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


More information about the llvm-commits mailing list