[llvm] [LV] Transform to handle exits in the scalar loop (PR #148626)

David Sherwood via llvm-commits llvm-commits at lists.llvm.org
Mon Nov 17 05:20:53 PST 2025


================
@@ -4224,12 +4232,17 @@ class VPlan {
   /// Returns the preheader of the vector loop region, if one exists, or null
   /// otherwise.
   VPBasicBlock *getVectorPreheader() {
+    if (EarlyExitPreheader)
----------------
david-arm wrote:

I think in vplan this type of thing is typically discouraged, i.e. wherever possible we should walk the CFG to find the block so that we don't have the burden of maintaining the EarlyExitPreheader during CFG optimisations. @fhahn any thoughts?

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


More information about the llvm-commits mailing list