diff options
author | Sanjay Patel <spatel@rotateright.com> | 2018-04-27 14:22:48 +0000 |
---|---|---|
committer | Sanjay Patel <spatel@rotateright.com> | 2018-04-27 14:22:48 +0000 |
commit | 9aa61e9ad171d97007f2b9ec818f86c98540c1a8 (patch) | |
tree | 49477a9ee70c7126b5eadd9f92b8a95e483fcaaa /docs | |
parent | acc1201fbaa4ab12b98ceb03cd3c4edc3bae8ea5 (diff) | |
download | clang-9aa61e9ad171d97007f2b9ec818f86c98540c1a8.tar.gz |
[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
Diffstat (limited to 'docs')
-rw-r--r-- | docs/UsersManual.rst | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/docs/UsersManual.rst b/docs/UsersManual.rst index 3653d0088e..7425d2ad97 100644 --- a/docs/UsersManual.rst +++ b/docs/UsersManual.rst @@ -1255,6 +1255,16 @@ are listed below. flushed-to-zero number is preserved in the sign of 0, denormals are flushed to positive zero, respectively. +.. option:: -f[no-]fp-cast-overflow-workaround + + Enable a workaround for code that casts floating-point values to + integers and back to floating-point. If the floating-point value + is not representable in the intermediate integer type, the code is + incorrect according to the language standard. This flag will attempt + to generate code as if the result of an overflowing conversion matches + the overflowing behavior of a target's native float-to-int conversion + instructions. + .. option:: -fwhole-program-vtables Enable whole-program vtable optimizations, such as single-implementation |