[PATCH] D74017: AMDGPU/EG, CM: Implement fsqrt using recip(rsqrt(x)) instead of x * rsqrt(x)

Jan Vesely via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Feb 4 18:12:53 PST 2020


jvesely created this revision.
jvesely added a reviewer: arsenm.
Herald added subscribers: kerbowa, hiraditya, t-tye, tpr, dstuttard, yaxunl, nhaehnle, wdng, kzhuravl.
Herald added a project: LLVM.

The old version might be faster on EG (RECIP_IEEE is Trans only),
but it'd need extra corner case checks.
This gives correct corner case behaviour and saves a register.
Fixes OCL CTS sqrt test (1-thread, scalar) on Turks.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D74017

Files:
  llvm/lib/Target/AMDGPU/CaymanInstructions.td
  llvm/lib/Target/AMDGPU/EvergreenInstructions.td
  llvm/lib/Target/AMDGPU/R600Instructions.td
  llvm/test/CodeGen/AMDGPU/fsqrt.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D74017.242491.patch
Type: text/x-patch
Size: 5509 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200205/87ce4b67/attachment.bin>


More information about the llvm-commits mailing list