[llvm] [MachineBasicBlock] Fix use after free in SplitCriticalEdge (PR #66188)

via llvm-commits llvm-commits at lists.llvm.org
Wed Sep 13 03:00:53 PDT 2023


================
@@ -717,7 +717,8 @@ void MachineBasicBlock::updateTerminator(
       // If the unconditional successor block is not the current layout
       // successor, insert a branch to jump to it.
       if (!isLayoutSuccessor(PreviousLayoutSuccessor))
-        TII->insertBranch(*this, PreviousLayoutSuccessor, nullptr, Cond, DL);
+        TII->insertBranch(*this, PreviousLayoutSuccessor, nullptr, Cond, DL,
+                          nullptr, Indexes);
----------------
qcolombet wrote:

Nit: `/*BytesAdded=*/`

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


More information about the llvm-commits mailing list