Files
clang-p2996/llvm/lib/Target/AArch64/AArch64InstrInfo.cpp
Maurice Heumann 607c525110 [ARM64] [Windows] Mark block address as taken when expanding catchrets (#109252)
This fixes issue #109250

The issue happens during the `MachineBlockPlacement` pass. The block,
whose address was previously not taken, is deemed redundant by the pass
and subsequently replaced using
`MachineBasicBlock::ReplaceUsesOfBlockWith` in `BranchFolding`.

ReplaceUsesOfBlockWith only replaces uses in the terminator. However,
`expandPostRAPseudo` introduces new block uses when expanding catchrets.
These uses do not get replaced, which results in undefined label errors
later on.

Marking the block addresss as taken prevents the replacement of the
block, without also replacing non-terminator uses.
2024-09-30 11:14:38 -07:00

363 KiB