diff options
| author | Eli Friedman <efriedma@codeaurora.org> | 2018-07-17 20:31:42 +0000 |
|---|---|---|
| committer | Eli Friedman <efriedma@codeaurora.org> | 2018-07-17 20:31:42 +0000 |
| commit | d3a308789eaa0f878bc3a254917ae89efdbd3096 (patch) | |
| tree | 017c4210f5155a3c97aed4f0f5033653e75d91ec /llvm/docs | |
| parent | 8bb4326c04eebf68774cc07c32c0b93604be3597 (diff) | |
| download | bcm5719-llvm-d3a308789eaa0f878bc3a254917ae89efdbd3096.tar.gz bcm5719-llvm-d3a308789eaa0f878bc3a254917ae89efdbd3096.zip | |
[LangRef] nnan and ninf produce poison.
Clarify that violating nnan and ninf can lead to undefined behavior.
This allows more aggressive optimizations based on those assumptions.
Differential Revision: https://reviews.llvm.org/D47963
llvm-svn: 337323
Diffstat (limited to 'llvm/docs')
| -rw-r--r-- | llvm/docs/LangRef.rst | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/llvm/docs/LangRef.rst b/llvm/docs/LangRef.rst index 1f4641cb231..4dc010d8ddc 100644 --- a/llvm/docs/LangRef.rst +++ b/llvm/docs/LangRef.rst @@ -2350,13 +2350,13 @@ floating-point transformations. ``nnan`` No NaNs - Allow optimizations to assume the arguments and result are not - NaN. Such optimizations are required to retain defined behavior over - NaNs, but the value of the result is undefined. + NaN. If an argument is a nan, or the result would be a nan, it produces + a :ref:`poison value <poisonvalues>` instead. ``ninf`` No Infs - Allow optimizations to assume the arguments and result are not - +/-Inf. Such optimizations are required to retain defined behavior over - +/-Inf, but the value of the result is undefined. + +/-Inf. If an argument is +/-Inf, or the result would be +/-Inf, it + produces a :ref:`poison value <poisonvalues>` instead. ``nsz`` No Signed Zeros - Allow optimizations to treat the sign of a zero |

