[llvm] [VPlan] Add exit phi operands during initial construction (NFC). (PR #136455)

via llvm-commits llvm-commits at lists.llvm.org
Wed Apr 23 10:47:31 PDT 2025


================
@@ -352,6 +352,22 @@ std::unique_ptr<VPlan> PlainCFGBuilder::buildPlainCFG(
   Plan->getEntry()->setOneSuccessor(getOrCreateVPBB(TheLoop->getHeader()));
   Plan->getEntry()->setPlan(&*Plan);
 
+  // Fix VPlan loop-closed-ssa exit phi's by adding incoming operands to the
+  // VPIRInstructions wrapping them.
+  // Note that the operand order may need adjusting when predecessors are added,
----------------
ayalz wrote:

```suggestion
  // Note that the operand order corresponds to IR predecessor order, and may need adjusting when VPlan predecessors are added,
```

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


More information about the llvm-commits mailing list