[llvm] [LoopUnrollAndJam] Fix out-of-date LoopInfo being used during unroll and jam (PR #191250)
via llvm-commits
llvm-commits at lists.llvm.org
Fri Apr 10 09:13:03 PDT 2026
================
@@ -584,21 +584,23 @@ llvm::UnrollAndJamLoop(Loop *L, unsigned Count, unsigned TripCount,
// Apply updates to the DomTree.
DT = &DTU.getDomTree();
+ // Update LoopInfo if the loop is completely removed, and store the loop
+ // blocks before they become unavailable after the update.
+ std::vector<BasicBlock *> Blocks = L->getBlocks();
+ if (CompletelyUnroll)
+ LI->erase(L);
----------------
CongzheUalberta wrote:
Thank you, updated accordingly.
https://github.com/llvm/llvm-project/pull/191250
More information about the llvm-commits
mailing list