[PATCH] D72675: ix -ffast-math/-ffp-contract interaction
Warren Ristow via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Jan 13 19:19:11 PST 2020
wristow created this revision.
wristow added reviewers: spatel, mcberg2017.
Herald added subscribers: jsji, hiraditya, nemanjai.
Herald added a project: LLVM.
Fused Multiply Add (FMA) was not always being disabled when the switch `-ffp-contract=off` was used. More specifically, FMA is enabled when `-ffp-contract=fast` is used, and it also is enabled implicitly with `-ffast-math`. The combination:
-ffast-math -ffp-contract=off
is intended to leave most of fast-math enabled (for example, leave reassociation, reciprocal transformations, etc.) enabled, but disable the use of FMA. However, FMA was incorrectly left enabled with the above switch combination. This commit fixes this, allowing users to enable most of the fast-math optimizations, while disabling the FMA feature.
https://reviews.llvm.org/D72675
Files:
clang/lib/Driver/ToolChains/Clang.cpp
clang/test/Driver/fast-math.c
llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
llvm/test/CodeGen/PowerPC/fmf-propagation.ll
llvm/test/CodeGen/X86/fp-contract.ll
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D72675.237834.patch
Type: text/x-patch
Size: 25707 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200114/60f4b322/attachment.bin>
More information about the llvm-commits
mailing list