[PATCH] D57718: [PPC] Adjust the computed branch offset for the possible shorter distance

Guozhi Wei via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Feb 13 15:31:49 PST 2019


Carrot added a comment.

In D57718#1396611 <https://reviews.llvm.org/D57718#1396611>, @sdardis wrote:

> In D57718#1393615 <https://reviews.llvm.org/D57718#1393615>, @Carrot wrote:
>
> > In D57718#1393504 <https://reviews.llvm.org/D57718#1393504>, @jsji wrote:
> >
> > > Any testcases that can show the problem and test the fix? Thanks.
> >
> >
> > It can only be triggered by a very large (>32KB) function body because the range of conditional branch is +/- 32KB.
> >
> > In our case, the large function body is caused by aggressive thinlto guided inlining.
> >
> > So no small test case can demonstrate the problem :(
>
>
> You can use the assembly directive '.space' to create arbitrary sized basic blocks. See test/CodeGen/RISCV/branch-relaxation.ll for examples.


Looks very useful. Will try it. Thanks a lot!


Repository:
  rL LLVM

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D57718/new/

https://reviews.llvm.org/D57718





More information about the llvm-commits mailing list