[PATCH] D46662: [X86] condition branches folding for three-way conditional codes

Roman Lebedev via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Nov 9 08:49:47 PST 2018


lebedev.ri added a comment.

In https://reviews.llvm.org/D46662#1246810, @andreadb wrote:

> In https://reviews.llvm.org/D46662#1246781, @xur wrote:
>
> > Hi Andrea,
> >
> > Thanks for running this test, and the explanation. Can you run the tests
> >  on Bulldozer/Ryzen? I don't have access to these platforms. If I need to do
> >  this in subtarget way, it would be good to know the performance there.
>
>
> CC'ing @lebedev.ri  and @GGanesh.
>  They should be able to help you with running those tests on Bulldozer/Ryzen. Unfortunately, I don't have access to those machines.


I *think* this should be fine on bdver2, as per https://www.agner.org/optimize/microarchitecture.pdf:

  19.15 Branches and loops
  The branch prediction mechanism is described on page 34. There is no longer any
  restriction on the number of branches per 16 bytes of code that can be predicted efficiently.
  The misprediction penalty is quite high because of a long pipeline.



In https://reviews.llvm.org/D46662#1246550, @andreadb wrote:

> ...
>  Bench: 4evencases.cc
>  ...
>  Bench: 15evencases.cc
>  ...
>  I wouldn't be surprised if instead this patch improves the performance of code on other big AMD cores like Bulldozer/ryzen.


Are these benchmarks available from somewhere? Can i run them somehow?

> -Andrea

Roman


Repository:
  rL LLVM

https://reviews.llvm.org/D46662





More information about the llvm-commits mailing list