From b7c584eaa0864589f5c73adba5469686dc110372 Mon Sep 17 00:00:00 2001 From: Ralf Jung Date: Mon, 9 Oct 2023 07:58:23 +0200 Subject: [PATCH] clarify NaN propagation in fptrunc --- llvm/docs/LangRef.rst | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/llvm/docs/LangRef.rst b/llvm/docs/LangRef.rst index 1883e9f6290b1..e27d4e0ed6953 100644 --- a/llvm/docs/LangRef.rst +++ b/llvm/docs/LangRef.rst @@ -11311,7 +11311,10 @@ environment `. NaN values follow the usual :ref:`NaN behaviors `, except that _if_ a NaN payload is propagated from the input ("Quieting NaN propagation" or "Unchanged NaN propagation" cases), then the low order bits of the NaN payload -which cannot fit in the resulting type are discarded. +which cannot fit in the resulting type are discarded. Note that if discarding +the low order bits leads to an all-0 payload, this cannot be represented as a +signaling NaN (it would represent an infinity instead), so in that case +"Unchanged NaN propagation" is not possible. Example: """"""""