[PATCH] D28619: [NVPTX] Only lower sin/cos to approximate instructions if unsafe math is allowed.
Artem Belevich via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Jan 12 11:23:48 PST 2017
tra created this revision.
tra added reviewers: jlebar, jholewinski.
tra added a subscriber: llvm-commits.
Previously we'd always lower `@llvm.{sin,cos}.f32` to `{sin.cos}.approx.f32` instruction even when unsafe FP math was not allowed.
Clang-generated IR is not affected by this change as it uses precise sin/cos from CUDA's libdevice when unsafe math is disabled.
https://reviews.llvm.org/D28619
Files:
lib/Target/NVPTX/NVPTXISelDAGToDAG.cpp
lib/Target/NVPTX/NVPTXISelDAGToDAG.h
lib/Target/NVPTX/NVPTXISelLowering.cpp
lib/Target/NVPTX/NVPTXISelLowering.h
lib/Target/NVPTX/NVPTXInstrInfo.td
test/CodeGen/NVPTX/fast-math.ll
test/CodeGen/NVPTX/fcos-no-fast-math.ll
test/CodeGen/NVPTX/fsin-no-fast-math.ll
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D28619.84150.patch
Type: text/x-patch
Size: 6560 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170112/a3a577fb/attachment.bin>
More information about the llvm-commits
mailing list