[llvm] [VPlan] Simplify branch on False in VPlan transform (NFC). (PR #140409)
    via llvm-commits 
    llvm-commits at lists.llvm.org
       
    Thu May 29 05:37:37 PDT 2025
    
    
  
================
@@ -3737,6 +3738,15 @@ VPPhiAccessors::getIncomingBlock(unsigned Idx) const {
   return getAsRecipe()->getParent()->getCFGPredecessor(Idx);
 }
 
+inline void VPPhiAccessors::removeIncomingValue(VPBlockBase *VPB) const {
+  VPRecipeBase *R = const_cast<VPRecipeBase *>(getAsRecipe());
+  const VPBasicBlock *Parent = R->getParent();
+  assert(R->getNumOperands() == Parent->getNumPredecessors());
----------------
ayalz wrote:
```suggestion
  assert(R->getNumOperands() == Parent->getNumPredecessors() && "Number of phi operands must match number of predecessors");
```
https://github.com/llvm/llvm-project/pull/140409
    
    
More information about the llvm-commits
mailing list