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

Florian Hahn via llvm-commits llvm-commits at lists.llvm.org
Fri May 23 07:46:18 PDT 2025


================
@@ -4246,7 +4246,8 @@ class VPlan {
   /// that this relies on unneeded branches to the scalar tail loop being
   /// removed.
   bool hasScalarTail() const {
-    return getScalarPreheader()->getNumPredecessors() != 0;
+    return getScalarPreheader()->getNumPredecessors() != 0 &&
+           getScalarPreheader()->getSinglePredecessor() != getEntry();
----------------
fhahn wrote:

Updated thanks

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


More information about the llvm-commits mailing list