[PATCH] D143074: [LangRef] improve documentation of SNaN in the default FP environment

Mak Nazečić-Andrlon via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Feb 2 17:04:25 PST 2023


Muon added a comment.

I think "no attempt to set status flags" is a bit confusing, since they will in fact be set on compliant architectures whenever an operation is not optimized out. Similarly for "Signaling NaNs are not handled as specified by IEEE-754", since a compliant architecture will in fact follow spec whenever the operation on a signaling NaN is not optimized out. This is why I was hedging in my earlier version with "no attempt to ensure" and "no guarantee".

That said, if we're instead just trying to specify what the LLVM abstract machine does, with no regard to lowering, it would be more like:

"The default LLVM floating-point environment assumes that floating-point instructions do not have side effects. Results assume the round-to-nearest rounding mode. Operations assume default exception handling according to IEEE 754, with the following changes:

1. Status flags are assumed not to exist.
2. Signaling NaNs are assumed not to signal exceptions.
  - As such, arithmetic operations are not guaranteed to quiet a signaling NaN."


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D143074/new/

https://reviews.llvm.org/D143074



More information about the llvm-commits mailing list