On Fri, Dec 09, 2016 at 07:38:47AM +0100, Peter Zijlstra wrote:
On Fri, Dec 09, 2016 at 06:26:38AM +0100, Peter Zijlstra wrote:Only when using x86_64 instructions, once I fixed the i386 variant it
Just for giggles, on tilegx the branch is actually slower than doing theOn my Haswell laptop the unconditional version is faster too.
The problem is that the two multiplies would otherwise completely
pipeline, whereas with the conditional you serialize them.
was slower, probably due to register pressure and the like.
Do we want something like so?(came to light while talking about why the mul_u64_u32_shr() fallbackTurns out using GCC-6.2.1 we have the same problem on i386, GCC doesn't
didn't work right for them, which was a combination of the above issue
and the fact that their compiler 'lost' the fact that these are
32x32->64 mults and did 64x64 ones instead).
recognise the 32x32 mults and generates crap.
This used to work :/
arch/tile/include/asm/Kbuild | 1 -
arch/tile/include/asm/div64.h | 14 ++++++++++++++
arch/x86/include/asm/div64.h | 10 ++++++++++
include/linux/math64.h | 26 ++++++++++++++++++--------
4 files changed, 42 insertions(+), 9 deletions(-)