[llvm] [BOLT][AArch64] Treat `br x30` as a return (PR #159458)
Maksim Panchenko via llvm-commits
llvm-commits at lists.llvm.org
Thu Sep 18 10:05:06 PDT 2025
maksfb wrote:
Thanks for the details on the differences between the two instructions.
For the part where we decide how to treat `br x30` while building the CFG, I believe we can add a sanity check for `x30/LR` usage in the containing function. If custom assembly code uses `x30` in a non-standard manner and then issues either `br x30` or `ret`, then the control flow analysis could be wrong.
For instruction conversion, which I don't yet plan to implement, it makes sense to perform such only under an option and issue a warning.
As to how frequent `br x30` occurs, I don't have the data, I only know that the code comes from assembly. @yozhu, could you please share which libraries have it?
https://github.com/llvm/llvm-project/pull/159458
More information about the llvm-commits
mailing list