[PATCH] D151834: Include math-errno with fast-math

Zahira Ammarguellat via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Aug 1 07:28:57 PDT 2023


zahiraam added inline comments.


================
Comment at: clang/docs/LanguageExtensions.rst:4702
+optimizations are enabled in the section of code governed by the pragma.
+Effectively ``-ffast-math`` is enabled and ``-ffp-contract=fast``. This pragam
+disables ``-fmath-errno``.
----------------
aaron.ballman wrote:
> 
At least I was consistent :-)


================
Comment at: clang/docs/UsersManual.rst:1727
 
-   * ``precise`` Disables optimizations that are not value-safe on floating-point data, although FP contraction (FMA) is enabled (``-ffp-contract=on``).  This is the default behavior.
+   * ``precise`` Disables optimizations that are not value-safe on floating-point data, although FP contraction (FMA) is enabled (``-ffp-contract=on``).  This is the default behavior. This value resets ``-fmath-errno`` to its target-dependent default.
    * ``strict`` Enables ``-frounding-math`` and ``-ffp-exception-behavior=strict``, and disables contractions (FMA).  All of the ``-ffast-math`` enablements are disabled. Enables ``STDC FENV_ACCESS``: by default ``FENV_ACCESS`` is disabled. This option setting behaves as though ``#pragma STDC FENV_ACCESS ON`` appeared at the top of the source file.
----------------
aaron.ballman wrote:
> Can you re-flow this to 80 columns?
Did the same for the rest of the text too. Is that OK?


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

https://reviews.llvm.org/D151834



More information about the cfe-commits mailing list