]> granicus.if.org Git - clang/commit
[Driver, CodeGen] add options to enable/disable an FP cast optimization
authorSanjay Patel <spatel@rotateright.com>
Fri, 27 Apr 2018 14:22:48 +0000 (14:22 +0000)
committerSanjay Patel <spatel@rotateright.com>
Fri, 27 Apr 2018 14:22:48 +0000 (14:22 +0000)
commit9aa61e9ad171d97007f2b9ec818f86c98540c1a8
tree49477a9ee70c7126b5eadd9f92b8a95e483fcaaa
parentacc1201fbaa4ab12b98ceb03cd3c4edc3bae8ea5
[Driver, CodeGen] add options to enable/disable an FP cast optimization

As discussed in the post-commit thread for:
rL330437 ( http://lists.llvm.org/pipermail/llvm-commits/Week-of-Mon-20180423/545906.html )

We need a way to opt-out of a float-to-int-to-float cast optimization because too much
existing code relies on the platform-specific undefined result of those casts when the
float-to-int overflows.

The LLVM changes associated with adding this function attribute are here:
rL330947
rL330950
rL330951

Also as suggested, I changed the LLVM doc to mention the specific sanitizer flag that
catches this problem:
rL330958

Differential Revision: https://reviews.llvm.org/D46135

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@331041 91177308-0d34-0410-b5e6-96231b3b80d8
docs/UsersManual.rst
include/clang/Driver/Options.td
include/clang/Frontend/CodeGenOptions.def
lib/CodeGen/CGCall.cpp
lib/Driver/ToolChains/Clang.cpp
lib/Frontend/CompilerInvocation.cpp
test/CodeGen/no-junk-ftrunc.c [new file with mode: 0644]
test/Driver/fast-math.c