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

Florian Hahn via llvm-commits llvm-commits at lists.llvm.org
Tue May 27 05:51:22 PDT 2025


================
@@ -8761,7 +8757,7 @@ static void addScalarResumePhis(VPRecipeBuilder &Builder, VPlan &Plan,
                                 DenseMap<VPValue *, VPValue *> &IVEndValues) {
   VPTypeAnalysis TypeInfo(Plan.getCanonicalIV()->getScalarType());
   auto *ScalarPH = Plan.getScalarPreheader();
-  auto *MiddleVPBB = cast<VPBasicBlock>(ScalarPH->getSinglePredecessor());
+  auto *MiddleVPBB = cast<VPBasicBlock>(ScalarPH->getPredecessors()[0]);
----------------
fhahn wrote:

Sounds good, will check where this could be useful separately.

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


More information about the llvm-commits mailing list