[llvm] [GlobalISel] Don't treat intrinsic callbr indirect dest as machine successor. (PR #221685)
Matt Arsenault via llvm-commits
llvm-commits at lists.llvm.org
Tue Sep 8 02:52:00 PDT 2026
================
@@ -240,18 +240,27 @@ bool InstructionSelectImpl::selectMachineFunction(MachineFunction &MF) {
}
for (MachineBasicBlock &MBB : MF) {
- if (MBB.empty())
- continue;
-
if (!SelectedBlocks.contains(&MBB)) {
// This is an unreachable block and therefore hasn't been selected, since
// the main selection loop above uses a postorder block traversal.
// We delete all the instructions in this block since it's unreachable.
MBB.clear();
+
+ // Clearing dropped the terminators that encoded this block's successors,
----------------
arsenm wrote:
MIR doesn't encode the successors in the terminators, the successors list does.
https://github.com/llvm/llvm-project/pull/221685
More information about the llvm-commits
mailing list