[PATCH] D138109: [clang] Fix -fp-model={strict|precise} to disable -fapprox-func

KAWASHIMA Takahiro via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Nov 16 02:47:13 PST 2022


kawashima-fj created this revision.
kawashima-fj added reviewers: masoud.ataei, zahiraam.
kawashima-fj added a project: clang.
Herald added a project: All.
kawashima-fj requested review of this revision.
Herald added subscribers: cfe-commits, MaskRay.

`-fapprox-func` should be disabled by `-fp-model={strict|precise}`, as well as other fast-math flags. See the last changes in `clang/test/Driver/fp-model.c`.

Probably this route (`case options::OPT_ffp_model_EQ`) was forgot to update in D106191 <https://reviews.llvm.org/D106191> and D114564 <https://reviews.llvm.org/D114564>. There is no appropriate reason not to disable the flag.

This commit also updates other regression tests, which are not directly related to this bug, for consistency with other fast-math flags.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D138109

Files:
  clang/lib/Driver/ToolChains/Clang.cpp
  clang/test/CodeGen/fp-options-to-fast-math-flags.c
  clang/test/Driver/fast-math.c
  clang/test/Driver/fp-model.c

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D138109.475744.patch
Type: text/x-patch
Size: 5586 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20221116/43951f0c/attachment.bin>


More information about the cfe-commits mailing list