[llvm] [VPlan] Introduce ExitPhi VPInstruction, use to create phi for FOR. (PR #94760)
via llvm-commits
llvm-commits at lists.llvm.org
Tue Jul 9 13:59:26 PDT 2024
================
@@ -8522,6 +8476,58 @@ static void addUsersInExitBlock(VPBasicBlock *HeaderVPBB, Loop *OrigLoop,
}
}
+/// Feed a resume value for every FOR from the vector loop to the scalar loop,
+/// if middle block branches to scalar preheader, by introducing ExtractFromEnd
+/// and ResumePhi recipes in each, respectively, and a VPLiveOut which uses the
+/// latter and corresponds to the scalar header.
+static void addLiveOutsForFirstOrderRecurrences(VPlan &Plan) {
+ VPRegionBlock *VectorRegion = Plan.getVectorLoopRegion();
+
+ // Start by finding out if middle block branches to scalar preheader.
----------------
ayalz wrote:
```suggestion
// Start by finding out if middle block branches to scalar preheader, which is not a VPIRBasicBlock, unlike Exit block - the other possible successor of middle block.
```
https://github.com/llvm/llvm-project/pull/94760
More information about the llvm-commits
mailing list