[llvm] [LoopVectorize] Enable vectorisation of early exit loops with live-outs (PR #120567)

Graham Hunter via llvm-commits llvm-commits at lists.llvm.org
Tue Jan 21 03:47:52 PST 2025


================
@@ -501,8 +501,15 @@ void VPBasicBlock::execute(VPTransformState *State) {
     UnreachableInst *Terminator = State->Builder.CreateUnreachable();
     // Register NewBB in its loop. In innermost loops its the same for all
     // BB's.
-    if (State->CurrentParentLoop)
-      State->CurrentParentLoop->addBasicBlockToLoop(NewBB, *State->LI);
+    Loop *ParentLoop = State->CurrentParentLoop;
----------------
huntergr-arm wrote:

Is it possible to improve tracking the CurrentParentLoop instead of working around it here?

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


More information about the llvm-commits mailing list