[llvm] [VPlan] Replace VPRegionBlock with explicit CFG before execute (NFCI). (PR #117506)

Florian Hahn via llvm-commits llvm-commits at lists.llvm.org
Mon May 12 04:36:53 PDT 2025


================
@@ -2778,13 +2787,13 @@ void InnerLoopVectorizer::fixVectorizedLoop(VPTransformState &State) {
   PSE.getSE()->forgetLoop(OrigLoop);
   PSE.getSE()->forgetBlockAndLoopDispositions();
 
-  // Don't apply optimizations below when no vector region remains, as they all
-  // require a vector loop at the moment.
-  if (!State.Plan->getVectorLoopRegion())
+  // Don't apply optimizations below when no vector loop remains, as they all
+  // require one at the moment.
+  VPBasicBlock *HeaderVPBB =
+      getHeaderForMainVectorLoop(*State.Plan, State.VPDT);
----------------
fhahn wrote:

We could, although it wouldnt' be much simpler? I left it as is for now

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


More information about the llvm-commits mailing list