[clang] [llvm] [ARM, AArch64] Don't put BTI at asm goto branch targets (PR #141562)
Peter Smith via cfe-commits
cfe-commits at lists.llvm.org
Tue May 27 08:19:24 PDT 2025
================
@@ -3399,7 +3399,10 @@ void SelectionDAGBuilder::visitCallBr(const CallBrInst &I) {
BasicBlock *Dest = I.getIndirectDest(i);
MachineBasicBlock *Target = FuncInfo.getMBB(Dest);
Target->setIsInlineAsmBrIndirectTarget();
- Target->setMachineBlockAddressTaken();
+ // If there was a type of asm goto statement that was permitted to
+ // use an indirect call instruction to jump to its labels, then we
+ // would also have to call Target->setMachineBlockAddressTaken()
+ // here to mark the target block as requiring a BTI.
----------------
smithp35 wrote:
Worth adding a newline to imply that the comment isn't applying to the next line.
https://github.com/llvm/llvm-project/pull/141562
More information about the cfe-commits
mailing list