[PATCH] D69878: Consoldiate internal denormal flushing controls

Matt Arsenault via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Nov 6 15:01:34 PST 2019


arsenm marked an inline comment as done.
arsenm added inline comments.


================
Comment at: llvm/docs/LangRef.rst:1828-1831
+   be flushed to zero by standard floating point operations. It is not
+   mandated that flushing to zero occurs, but if a subnormal output is
+   flushed to zero, it must respect the sign mode. Not all targets
+   support all modes.
----------------
arsenm wrote:
> On second thought I think this may be too permissive. I think based on the use in DAGCombiner, that flushing of outputs is compulsory.
It turns out the fast sqrt usage really cares about input denormals being implicitly treated as 0, not the output flushing (i.e. this only needs DAZ, not FTZ). I think being permissive on the output is OK, but if implicit input flushing is required then it's compulsory and a target is responsible for inserting a flush of some kind if the use instruction isn't known to follow this mode.

Because of this, I do think it's necessary to treat this as two separate modes. I'm thinking to comma separate output-mode,input-mode, and assume input-mode=output-mode if the second half isn't specified for compatibility with the existing attribute.


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

https://reviews.llvm.org/D69878





More information about the cfe-commits mailing list