[PATCH] D118534: [X86] Introduce more common modern tunings into `generic`

Simon Pilgrim via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Feb 4 01:28:02 PST 2022


RKSimon added a comment.

In D118534#3295994 <https://reviews.llvm.org/D118534#3295994>, @lebedev.ri wrote:

> Please split Znver changes into a separate review.
> At least for znver3, i'm not really confident that `fsqrt` is fast,
> https://www.agner.org/optimize/instruction_tables.pdf says ~25cy,
> while NR takes ~19cy: https://godbolt.org/z/rK9ra4hse

'fsqrt' is the x87 instruction, I think the tuning flag (despite its name which is IR based not x87 based) is concerned with the SSE instruction (v)sqrtss - https://godbolt.org/z/qTzesKWvj

But lets make any znver changes independent of this patch

I'm happy for TuningFastScalarFSQRT to be enabled by default - more recent CPUs are benefiting less and less from NR approximations (NR is usually still worth it for float4/float8 though).


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D118534



More information about the llvm-commits mailing list