[llvm] [PHIElimination] Ensure correct copy emission for `INLINEASM_BR` indirect targets (PR #173396)
Antonio Frighetto via llvm-commits
llvm-commits at lists.llvm.org
Tue Dec 23 12:28:35 PST 2025
================
@@ -13,6 +13,19 @@
using namespace llvm;
+// Returns true if MBB contains an INLINEASM_BR instruction that may
+// branch to SuccMBB, requiring specialized copy placement.
+static bool hasInlineAsmBrToSuccessor(MachineBasicBlock *MBB,
+ MachineBasicBlock *SuccMBB) {
+ if (!SuccMBB->isInlineAsmBrIndirectTarget())
+ return false;
+
+ for (const MachineInstr &MI : *MBB)
----------------
antoniofrighetto wrote:
Not sure if there's a best alternative, INLINEASM_BR doesn't seem to be a terminator and we might introduce copies between INLINEASM_BR and the jump to its fallthrough during codegen.
https://github.com/llvm/llvm-project/pull/173396
More information about the llvm-commits
mailing list