[llvm] [VPlan] Connect Entry to scalar preheader during initial construction. (PR #140132)

via llvm-commits llvm-commits at lists.llvm.org
Tue May 27 02:18:34 PDT 2025


================
@@ -490,7 +490,7 @@ class InnerLoopVectorizer {
         MinProfitableTripCount(MinProfitableTripCount), UF(UnrollFactor),
         Builder(PSE.getSE()->getContext()), Cost(CM), BFI(BFI), PSI(PSI),
         RTChecks(RTChecks), Plan(Plan),
-        VectorPHVPB(Plan.getEntry()->getSingleSuccessor()) {}
+        VectorPHVPB(Plan.getVectorLoopRegion()->getSinglePredecessor()) {}
----------------
ayalz wrote:

Note that ILV now depends on HCFG here, and elsewhere. Maybe better to retrieve the first hierarchical predecessor of first header block, to relax this dependence, possibly as follow up.

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


More information about the llvm-commits mailing list