[PATCH] D28508: [NVPTX] Lower to sqrt.approx and rsqrt.approx under more circumstances.

Justin Lebar via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jan 9 19:30:50 PST 2017


jlebar created this revision.
jlebar added a reviewer: majnemer.
jlebar added subscribers: tra, llvm-commits.
Herald added a subscriber: jholewinski.

- Now we emit sqrt.approx and rsqrt.approx for calls to @llvm.sqrt.f32. Previously, we only would emit it for calls to @llvm.nvvm.sqrt.f.

- Now we emit the ftz version of rsqrt.approx when ftz is enabled. Previously, we only emitted rsqrt.approx when ftz was disabled.

- Now we emit rsqrt.approx only when approx division and approx sqrt is enabled.  Previously, we only emitted it when approx sqrt was enabled and approx division was *disabled*, which makes very little sense.


https://reviews.llvm.org/D28508

Files:
  llvm/lib/Target/NVPTX/NVPTXInstrInfo.td
  llvm/test/CodeGen/NVPTX/fast-math.ll
  llvm/test/CodeGen/NVPTX/rsqrt.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D28508.83769.patch
Type: text/x-patch
Size: 7202 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170110/e0749b43/attachment.bin>


More information about the llvm-commits mailing list