[all-commits] [llvm/llvm-project] 3d8932: [clang-cl] Increase /fp flag fidelity

David Majnemer via All-commits all-commits at lists.llvm.org
Mon Aug 22 11:57:20 PDT 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 3d89323d1896fde5dc69ecb8306917718c5e3aed
      https://github.com/llvm/llvm-project/commit/3d89323d1896fde5dc69ecb8306917718c5e3aed
  Author: David Majnemer <david.majnemer at gmail.com>
  Date:   2022-08-22 (Mon, 22 Aug 2022)

  Changed paths:
    M clang/include/clang/Driver/Options.td
    M clang/test/Driver/cl-options.c

  Log Message:
  -----------
  [clang-cl] Increase /fp flag fidelity

They were mapped as follows:
- /fp:except to --ftrapping-math
- /fp:except- to --fno-trapping-math
- /fp:strict to --fno-fast-math
- /fp:precise to --fno-fast-math

Let's map them as follows:
- /fp:except to --ffp-exception-behavior=strict
- /fp:except- to --ffp-exception-behavior=ignore
- /fp:strict to --ffp-model=strict
- /fp:precise to --ffp-model=ignore

I believe the changes to /fp:except are technically a no-op but it makes
the mapping a lot clearer. The changes for /fp:strict and /fp:precise are not
no-ops, they now match MSVC's behavior.

While we are here, also add support for /fp:contract by mapping it to
-ffp-contract=on.




More information about the All-commits mailing list