[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:32 PDT 2025
    
    
  
================
@@ -1137,10 +1137,10 @@ InstructionCost VPIRInstruction::computeCost(ElementCount VF,
   return 0;
 }
 
-void VPIRInstruction::extractLastLaneOfOperand(VPBuilder &Builder) {
+void VPIRInstruction::extractLastLaneOfFirstOperand(VPBuilder &Builder) {
   assert(isa<PHINode>(getInstruction()) &&
-         "can only add exiting operands to phi nodes");
-  assert(getNumOperands() == 1 && "must have a single operand");
+         "can only update exiting operands to phi nodes");
+  assert(getNumOperands() > 0 && "must have at least one operand");
   VPValue *Exiting = getOperand(0);
   if (!Exiting->isLiveIn()) {
----------------
ayalz wrote:
```suggestion
  if (Exiting->isLiveIn())
    return;
  VPValue *Exiting = getOperand(0);
```
?
https://github.com/llvm/llvm-project/pull/136455
    
    
More information about the llvm-commits
mailing list