[llvm] [AArch64][CodeGen] Fix trampoline basic block offset (PR #202716)
Eli Friedman via llvm-commits
llvm-commits at lists.llvm.org
Wed Jun 10 09:20:02 PDT 2026
================
@@ -280,7 +280,9 @@ BranchRelaxation::createNewBlockAfter(MachineBasicBlock &OrigMBB,
OrigMBB.setIsEndSection(false);
// Insert an entry into BlockInfo to align it properly with the block numbers.
- BlockInfo.insert(BlockInfo.begin() + NewBB->getNumber(), BasicBlockInfo());
+ auto It = BlockInfo.insert(BlockInfo.begin() + NewBB->getNumber(),
+ BasicBlockInfo());
+ It->Offset = BlockInfo[OrigMBB.getNumber()].postOffset(*NewBB);
----------------
efriedma-quic wrote:
We know the offset where we're inserting the block, I think? It's the offset of the block after the insertion point.
https://github.com/llvm/llvm-project/pull/202716
More information about the llvm-commits
mailing list