[llvm] [VPlan] Use DomTreeUpdater to automatically update DT for vector loop. (PR #92525)

Florian Hahn via llvm-commits llvm-commits at lists.llvm.org
Thu May 23 14:34:15 PDT 2024


================
@@ -891,13 +899,9 @@ void VPlan::execute(VPTransformState *State) {
     }
   }
 
-  // We do not attempt to preserve DT for outer loop vectorization currently.
-  if (!EnableVPlanNativePath) {
-    BasicBlock *VectorHeaderBB = State->CFG.VPBB2IRBB[Header];
-    State->DT->addNewBlock(VectorHeaderBB, VectorPreHeader);
-    updateDominatorTree(State->DT, VectorHeaderBB, VectorLatchBB,
-                        State->CFG.ExitBB);
-  }
+  State->CFG.DTU.flush();
+  assert(EnableVPlanNativePath || State->CFG.DTU.getDomTree().verify(
+                                      DominatorTree::VerificationLevel::Fast));
----------------
fhahn wrote:

Added back, thanks!

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


More information about the llvm-commits mailing list