[all-commits] [llvm/llvm-project] 7b5871: [LoopFusion] Remove DT edge from Extiblock to Exit...

Afonso Rafael (Gafanhoto) via All-commits all-commits at lists.llvm.org
Wed Apr 29 03:39:47 PDT 2026


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 7b58716d96c3ae4c0c4e6f72e29b16137bb6224b
      https://github.com/llvm/llvm-project/commit/7b58716d96c3ae4c0c4e6f72e29b16137bb6224b
  Author: Afonso Rafael (Gafanhoto) <afonsorafael at sapo.pt>
  Date:   2026-04-29 (Wed, 29 Apr 2026)

  Changed paths:
    M llvm/lib/Transforms/Scalar/LoopFuse.cpp
    A llvm/test/Transforms/LoopFusion/pr193641.ll

  Log Message:
  -----------
  [LoopFusion] Remove DT edge from Extiblock to ExitBlockSuc (#193641)

To remove the exit block, it cannot have successors, if this edge is not
removed, when applying the updates to the DT the following assertion
will appear:
"Assertion `Node->isLeaf() && "Node is not a leaf node."' failed"

This assertion does not always fail because before applying the updates
on the "GenericDomTreeContruction", "ApplyUpdates" function it runs
CalculateFromScratch on some situations:

    // Make unittests of the incremental algorithm work
    if (DT.DomTreeNodes.size() <= 100) {
      if (BUI.NumLegalized > DT.DomTreeNodes.size())
        CalculateFromScratch(DT, &BUI);
    } else if (BUI.NumLegalized > DT.DomTreeNodes.size() / 40)
      CalculateFromScratch(DT, &BUI);



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list