[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
================
@@ -2379,11 +2379,9 @@ void InnerLoopVectorizer::introduceCheckBlockInVPlan(BasicBlock *CheckIRBB) {
PreVectorPH->swapSuccessors();
// We just connected a new block to the scalar preheader. Update all
- // ResumePhis by adding an incoming value for it, replicating the last value.
- for (VPRecipeBase &R : *cast<VPBasicBlock>(ScalarPH)) {
- auto *ResumePhi = dyn_cast<VPInstruction>(&R);
- if (!ResumePhi || ResumePhi->getOpcode() != VPInstruction::ResumePhi)
- continue;
+ // VPPhis by adding an incoming value for it, replicating the last value.
----------------
ayalz wrote:
nit: take the number of ScalarPH predecessors once, here, reuse it repeatedly inside the loop, asserting it is one more than the number of ResumePhi's operands.
https://github.com/llvm/llvm-project/pull/140409
More information about the llvm-commits
mailing list