[PATCH] D142907: LangRef: Add "dynamic" option to "denormal-fp-math"

Joshua Cranmer via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Feb 2 15:20:09 PST 2023


jcranmer-intel added a comment.

Looking at the attribute logic here, there is conceptual room for both a `dynamic` and an `unknown` mode (i.e., you get a top and a bottom value), but I don't think there is value in distinguishing between them, so I'm fine with keeping just a `dynamic`.

I didn't bother to look at the clang changes, and my only comments are some minor ones around documentation:



================
Comment at: llvm/docs/LangRef.rst:2166-2167
+
+    If the mode is ``"dynamic"``, transformations which depend on the
+    behavior of denormal values should not be performed.
+
----------------
I feel like the description of this mode should mention that whether or not denormals are flushed is derived from the dynamic state of the FP environment.


================
Comment at: llvm/docs/LangRef.rst:2174-2178
    If the input mode is ``"preserve-sign"``, or ``"positive-zero"``, a
    floating-point operation must treat any input denormal value as
    zero. In some situations, if an instruction does not respect this
    mode, the input may need to be converted to 0 as if by
    ``@llvm.canonicalize`` during lowering for correctness.
----------------
This isn't your fault, but I noticed when reading the LangRef online that this paragraph has a slightly-different indentation that causes most of this attribute's documentation to gain an extra level of indentation.


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

https://reviews.llvm.org/D142907



More information about the cfe-commits mailing list