[llvm] [VPlan] Model branch cond to enter scalar epilogue in VPlan. (PR #92651)

via llvm-commits llvm-commits at lists.llvm.org
Thu Jul 4 13:29:40 PDT 2024


================
@@ -160,7 +160,11 @@ bool VPlanVerifier::verifyVPBasicBlock(const VPBasicBlock *VPBB) {
     errs() << "Same IR basic block used by multiple wrapper blocks!\n";
     return false;
   }
-  if (IRBB != IRBB->getPlan()->getPreheader()) {
+
+  VPBlockBase *MiddleBB =
+      IRBB->getPlan()->getVectorLoopRegion()->getSingleSuccessor();
+  if (IRBB != IRBB->getPlan()->getPreheader() &&
+      IRBB->getSinglePredecessor() != MiddleBB) {
     errs() << "VPIRBasicBlock can only be used as pre-header at the moment!\n";
----------------
ayalz wrote:

```suggestion
    errs() << "VPIRBasicBlock can only be used as pre-header or a successor of middle-block at the moment!\n";
```

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


More information about the llvm-commits mailing list