[llvm] [BOLT][AArch64] Treat `br x30` as a return (PR #159458)
    Paschalis Mpeis via llvm-commits 
    llvm-commits at lists.llvm.org
       
    Thu Sep 18 02:01:58 PDT 2025
    
    
  
https://github.com/paschalis-mpeis commented:
`RET` does `BR x30` by default, but a `BR x30` is not necessarily a return.
In the PCS, `x30`  is the `LR`, but it can still be used as a GP in custom assembly.
 
> Do you see `BR x30` frequently enough in code in the wild that it makes a meaningful difference to recognize it as a return in BOLT?
It'll be interesting to see where such cases comes from, and as Kristof says, how often they occur.
At minimum, we could emit some warnings to increase visibility and help improve the input sources (where is needed), or guard this simplification behind an experimental flag?
https://github.com/llvm/llvm-project/pull/159458
    
    
More information about the llvm-commits
mailing list