[clang] Fix -fp-model={strict|precise} to disable -fapprox-func
authorKAWASHIMA Takahiro <t-kawashima@fujitsu.com>
Mon, 14 Nov 2022 05:09:27 +0000 (14:09 +0900)
committerKAWASHIMA Takahiro <t-kawashima@fujitsu.com>
Tue, 22 Nov 2022 04:04:26 +0000 (13:04 +0900)
commit3a95d7d0983af26811e72d238d94f11c25f1851a
tree1efcc10562f520df546b602b8d93d3acf90af0b2
parentf99514ac3a6fbf8af619f45a93a22c81bb7f9e22
[clang] Fix -fp-model={strict|precise} to disable -fapprox-func

`-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 and 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.

Differential Revision: https://reviews.llvm.org/D138109
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