[llvm] [AArch64][BTI] Mark EH landing pads as jump targets (PR #149680)
Benjamin Herrenschmidt via llvm-commits
llvm-commits at lists.llvm.org
Sun Jul 20 22:05:19 PDT 2025
ozbenh wrote:
So I tested a quick backport to llvm15 (default on AL2023) and it didn't work:
```
+--- a/llvm/lib/Target/AArch64/AArch64BranchTargets.cpp
++++ b/llvm/lib/Target/AArch64/AArch64BranchTargets.cpp
+@@ -91,7 +91,7 @@ bool AArch64BranchTargets::runOnMachineFunction(MachineFunction &MF) {
+
+ // If the block itself is address-taken, it could be indirectly branched
+ // to, but not called.
+- if (MBB.hasAddressTaken() || JumpTableTargets.count(&MBB))
++ if (MBB.hasAddressTaken() || JumpTableTargets.count(&MBB) || MBB.isEHPad())
+ CouldJump = true;
+
+ if (CouldCall || CouldJump) {
```
That said I might have made a mistake, juggling too many plates today. I'll test on Fedora's llvm20 asap and check llvm15 again & will report.
https://github.com/llvm/llvm-project/pull/149680
More information about the llvm-commits
mailing list