Skip to content

clarify NaN propagation in fptrunc #68554

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Oct 26, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion llvm/docs/LangRef.rst
Original file line number Diff line number Diff line change
Expand Up @@ -11311,7 +11311,10 @@ environment <floatenv>`.
NaN values follow the usual :ref:`NaN behaviors <floatnan>`, 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:
""""""""
Expand Down