[llvm] r337323 - [LangRef] nnan and ninf produce poison.

Eli Friedman via llvm-commits llvm-commits at lists.llvm.org
Tue Jul 17 13:31:42 PDT 2018


Author: efriedma
Date: Tue Jul 17 13:31:42 2018
New Revision: 337323

URL: http://llvm.org/viewvc/llvm-project?rev=337323&view=rev
Log:
[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


Modified:
    llvm/trunk/docs/LangRef.rst

Modified: llvm/trunk/docs/LangRef.rst
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/docs/LangRef.rst?rev=337323&r1=337322&r2=337323&view=diff
==============================================================================
--- llvm/trunk/docs/LangRef.rst (original)
+++ llvm/trunk/docs/LangRef.rst Tue Jul 17 13:31:42 2018
@@ -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




More information about the llvm-commits mailing list