[llvm] [VPlan] Use VPlan predecessors in VPWidenPHIRecipe (NFC). (PR #126388)

via llvm-commits llvm-commits at lists.llvm.org
Sun Feb 9 02:16:23 PST 2025


================
@@ -136,19 +136,22 @@ void PlainCFGBuilder::fixPhiNodes() {
       // predecessor is the first operand of the recipe.
       assert(Phi->getNumOperands() == 2);
       BasicBlock *LoopPred = L->getLoopPredecessor();
-      VPPhi->addIncoming(
-          getOrCreateVPOperand(Phi->getIncomingValueForBlock(LoopPred)),
-          BB2VPBB[LoopPred]);
+      VPPhi->addOperand(
+          getOrCreateVPOperand(Phi->getIncomingValueForBlock(LoopPred)));
----------------
ayalz wrote:

(independent) This first operand can be set when creating the VPWidenPHIRecipe, only the second operand requires backpatching.

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


More information about the llvm-commits mailing list