[PATCH] D108961: [RISCV] MC relaxation for out-of-range conditional branch.
    Alex Bradbury via Phabricator via llvm-commits 
    llvm-commits at lists.llvm.org
       
    Thu Sep  2 06:44:35 PDT 2021
    
    
  
asb added a comment.
In D108961#2973678 <https://reviews.llvm.org/D108961#2973678>, @jrtc27 wrote:
> I know GNU as does this but I don't see why that's a good idea nor why we should; if you use a conditional branch to a label that's too far away then that's your problem and you should have written non-broken code. Having it insert the long branch form is too much magic for me...
Yes, I'm in two minds about this. I'm usually in favour of trying to match GNU tools behaviour in order to minimise porting issues / provide a more predictable user experience. But fighting against that, I'm really not a fan of these "magic" transformations either.
The fear with adding anything like this is of course adding a very rarely executed path that ends up having bugs in obscure cases. As such, if we were to go in this direction I'd be keen to see more extensive test coverage.
Repository:
  rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D108961/new/
https://reviews.llvm.org/D108961
    
    
More information about the llvm-commits
mailing list