summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen
diff options
context:
space:
mode:
authorOlivier Sallenave <ohsallen@us.ibm.com>2015-04-22 14:07:26 +0000
committerOlivier Sallenave <ohsallen@us.ibm.com>2015-04-22 14:07:26 +0000
commitc587bee405a4c542488412541753f2e1126392cf (patch)
treee48d3df7ab1f330587693f10a04fd4b5064c9f64 /llvm/lib/CodeGen
parent1d67713b443e640a3d7dab9a955c73b4452c5316 (diff)
downloadbcm5719-llvm-c587bee405a4c542488412541753f2e1126392cf.tar.gz
bcm5719-llvm-c587bee405a4c542488412541753f2e1126392cf.zip
Fixed logic to enable complex FMA formation.
llvm-svn: 235508
Diffstat (limited to 'llvm/lib/CodeGen')
-rw-r--r--llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp b/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
index 4b98da70720..f85582dc98b 100644
--- a/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
+++ b/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
@@ -7164,7 +7164,7 @@ SDValue DAGCombiner::visitFADDForFMACombine(SDNode *N) {
N0));
}
- if (LookThroughFPExt) {
+ if (UnsafeFPMath && LookThroughFPExt) {
// fold (fadd (fma x, y, (fpext (fmul u, v))), z)
// -> (fma x, y, (fma (fpext u), (fpext v), z))
auto FoldFAddFMAFPExtFMul = [&] (
@@ -7415,7 +7415,7 @@ SDValue DAGCombiner::visitFSUBForFMACombine(SDNode *N) {
N21, N0));
}
- if (LookThroughFPExt) {
+ if (UnsafeFPMath && LookThroughFPExt) {
// fold (fsub (fma x, y, (fpext (fmul u, v))), z)
// -> (fma x, y (fma (fpext u), (fpext v), (fneg z)))
if (N0.getOpcode() == PreferredFusedOpcode) {
OpenPOWER on IntegriCloud