[PATCH] D90174: [HIP] Fix regressions due to fp contract change

John McCall via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Nov 3 10:14:01 PST 2020


rjmccall added a comment.

Hmm.  Do we actually want this behavior of `fast` overriding pragmas?  What do other compilers do here?  It might be reasonable to just treat this as a bug.



================
Comment at: clang/docs/LanguageExtensions.rst:3214
+should be noted that ``-ffp-contract=fast`` option will always fuse multiply
+and addition across statements disregarding fp contract controlling pragmas.
 
----------------
Suggestion:

  This can be useful when fast contraction is otherwise enabled for the translation unit
  with the ``-ffp-contract=faststd`` flag. Note that ``-ffp-contract=fast`` will override
  pragmas to fuse multiply and addition across statements regardless of any controlling
  pragmas.


================
Comment at: clang/docs/UsersManual.rst:1295
    of this by default. This behavior can be controlled with the
-   ``FP_CONTRACT`` pragma. Please refer to the pragma documentation for a
-   description of how the pragma interacts with this option.
+   ``FP_CONTRACT`` pragma. Clang also supports ``clang fp contract`` pragma
+   for more flexible controlling of floating-point contractions in all
----------------
"...with the ``FP_CONTRACT`` and ``clang fp contract`` pragmas.  Please refer..."


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

https://reviews.llvm.org/D90174



More information about the cfe-commits mailing list