[llvm] [AArch64][BTI] Add BTI at EH entries. (PR #155308)
Shashi Shankar via llvm-commits
llvm-commits at lists.llvm.org
Tue Aug 26 12:32:36 PDT 2025
================
@@ -129,8 +134,15 @@ void AArch64BranchTargets::addBTI(MachineBasicBlock &MBB, bool CouldCall,
assert(HintNum != 32 && "No target kinds!");
auto MBBI = MBB.begin();
+ bool SawEHLabel = false;
- // Skip the meta instructions, those will be removed anyway.
+ // If the block starts with EH_LABEL(s), skip them first and remember we saw
+ // one.
+ while (MBBI != MBB.end() && MBBI->isEHLabel()) {
+ ++MBBI;
+ SawEHLabel = true;
+ }
+ /// Skip the meta instructions, those will be removed anyway.
----------------
shashforge wrote:
done
https://github.com/llvm/llvm-project/pull/155308
More information about the llvm-commits
mailing list