[llvm] [VPlan] Hook IR blocks into VPlan during skeleton creation (NFC) (PR #114292)
via llvm-commits
llvm-commits at lists.llvm.org
Wed Nov 13 15:43:58 PST 2024
================
@@ -1276,6 +1287,19 @@ VPlan *VPlan::duplicate() {
return NewPlan;
}
+VPBasicBlock *VPlan::getScalarPreheader() {
+ auto *MiddleVPBB =
+ cast<VPBasicBlock>(getVectorLoopRegion()->getSingleSuccessor());
+ if (MiddleVPBB->getNumSuccessors() == 2) {
+ // Order is strict: first is the exit block, second is the scalar preheader.
----------------
ayalz wrote:
Simpler to return last successor, provided it ain't a VPIRBB?
https://github.com/llvm/llvm-project/pull/114292
More information about the llvm-commits
mailing list