[llvm] [VPlan] Introduce ExitPhi VPInstruction, use to create phi for FOR. (PR #94760)

via llvm-commits llvm-commits at lists.llvm.org
Mon Jul 8 06:00:58 PDT 2024


================
@@ -909,6 +909,11 @@ void VPlan::prepareToExecute(Value *TripCountV, Value *VectorTripCountV,
 /// VPBB, if any, are rewired to the new VPIRBasicBlock.
 static void replaceVPBBWithIRVPBB(VPBasicBlock *VPBB, BasicBlock *IRBB) {
   VPIRBasicBlock *IRMiddleVPBB = new VPIRBasicBlock(IRBB);
+  for (auto &[_, LO] : VPBB->getPlan()->getLiveOuts()) {
+    if (LO->getPred() == VPBB)
----------------
ayalz wrote:

Better if all predecessor relations would continue to be recorded naturally between pairs of basic blocks only.

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


More information about the llvm-commits mailing list