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

James Y Knight via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Feb 3 15:24:42 PST 2023


jyknight added a comment.

Overall, I think the points we need to convey are here:

1. It's assumed that the rounding mode is round-to-nearest, and all floating-point traps are disabled.
2. The status flags may be set to arbitrary values.
3. Floating-point math operations assume that all NaNs are quiet.

For point 3: I've made this statement stronger than you had; we actually need the stronger statement, because we have other canonicalizations like `pow(1.0, <anything>) -> 1.0`. and `pow(<anything>, 0) -> 1.0` which I think should ALSO be kept in the default modes.

Q: What about the denormal fp environment settings (ftz/daz)? Should we say anything about those? They are frequently set globally (e.g. with -ffast-math), so presumably it's permissible to execute default-compiled code with them set, at least in some sense...


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

https://reviews.llvm.org/D143074



More information about the llvm-commits mailing list