[PATCH] D143074: [LangRef] improve documentation of SNaN in the default FP environment
Sanjay Patel via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Feb 3 08:39:43 PST 2023
spatel added a comment.
In D143074#4101323 <https://reviews.llvm.org/D143074#4101323>, @Muon wrote:
> 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:
Yes, this describes the IR-level semantics only. We could make a note about codegen semantics, but I don't think that's needed here.
> "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:
I don't understand the line about default exception handling - LLVM doesn't model exceptions or flags in this mode. We should create values as specified by IEEE-754, but that's it? The instructions are defined like this:
https://llvm.org/docs/LangRef.html#fmul-instruction
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D143074/new/
https://reviews.llvm.org/D143074
More information about the llvm-commits
mailing list