Skip to content

LangRef: Clarify behaviors of nsz in fast math flag #137567

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

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Changes from 1 commit
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
4 changes: 4 additions & 0 deletions llvm/docs/LangRef.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3914,6 +3914,10 @@ following flags to enable otherwise unsafe floating-point transformations.
No Signed Zeros - Allow optimizations to treat the sign of a zero
argument or zero result as insignificant. This does not imply that -0.0
is poison and/or guaranteed to not exist in the operation.
Don't require +0.0>-0.0 for min/max operations - Allow optimizations of the
min/max operation not to treat +0.0>-0.0. Note the result should be either of
the operands. (max|min)(-0.0, -0.0) should never return +0.0, and vice versa.
Note: floating compare operations always imply -0.0 == +0.0.

Note: For :ref:`phi <i_phi>`, :ref:`select <i_select>`, and :ref:`call <i_call>`
instructions, the following return types are considered to be floating-point
Expand Down
Loading