summaryrefslogtreecommitdiffstats
path: root/llvm/lib/MC/MCELFObjectTargetWriter.cpp
diff options
context:
space:
mode:
authorNicolai Haehnle <nhaehnle@gmail.com>2016-12-02 16:06:18 +0000
committerNicolai Haehnle <nhaehnle@gmail.com>2016-12-02 16:06:18 +0000
commit33ca182c91b46cd814d29e98cb79901f923a2296 (patch)
treedc581c0cf62f2f76a0fc456e8059033ca26d8d41 /llvm/lib/MC/MCELFObjectTargetWriter.cpp
parent9cb74267ac2ea86529618039942b638d5fe0a3a8 (diff)
downloadbcm5719-llvm-33ca182c91b46cd814d29e98cb79901f923a2296.tar.gz
bcm5719-llvm-33ca182c91b46cd814d29e98cb79901f923a2296.zip
[DAGCombiner] do not fold (fmul (fadd X, 1), Y) -> (fmad X, Y, Y) by default
Summary: When X = 0 and Y = inf, the original code produces inf, but the transformed code produces nan. So this transform (and its relatives) should only be used when the no-infs-fp-math flag is explicitly enabled. Also disable the transform using fmad (intermediate rounding) when unsafe-math is not enabled, since it can reduce the precision of the result; consider this example with binary floating point numbers with two bits of mantissa: x = 1.01 y = 111 x * (y + 1) = 1.01 * 1000 = 1010 (this is the exact result; no rounding occurs at any step) x * y + x = 1000.11 + 1.01 =r 1000 + 1.01 = 1001.01 =r 1000 (with rounding towards zero) The example relies on rounding towards zero at least in the second step. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=98578 Reviewers: RKSimon, tstellarAMD, spatel, arsenm Subscribers: wdng, llvm-commits Differential Revision: https://reviews.llvm.org/D26602 llvm-svn: 288506
Diffstat (limited to 'llvm/lib/MC/MCELFObjectTargetWriter.cpp')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud