summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
diff options
context:
space:
mode:
authorMichael Berg <michael_c_berg@apple.com>2018-06-14 20:54:13 +0000
committerMichael Berg <michael_c_berg@apple.com>2018-06-14 20:54:13 +0000
commit0c20447a02bb5ae37cc84312c834c1f924cee622 (patch)
tree1419acb3979e20fd9e14c0e065ffbb26296e55e5 /llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
parentd1e0365ce38238ca3f5e7ad30b376587d208e270 (diff)
downloadbcm5719-llvm-0c20447a02bb5ae37cc84312c834c1f924cee622.tar.gz
bcm5719-llvm-0c20447a02bb5ae37cc84312c834c1f924cee622.zip
easing the constraint for isNegatibleForFree and GetNegatedExpression
Summary: Here we relax the old constraint which utilized unsafe with the TargetOption flag HonorSignDependentRoundingFPMathOption, with the assertion that unsafe is no longer needed or never was required for correctness on FDIV/FMUL. Reviewers: spatel, hfinkel, wristow, arsenm, javed.absar Reviewed By: spatel Subscribers: efriedma, wdng, tpr Differential Revision: https://reviews.llvm.org/D48057 llvm-svn: 334769
Diffstat (limited to 'llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp')
-rw-r--r--llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp4
1 files changed, 0 insertions, 4 deletions
diff --git a/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp b/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
index 33821c33bb7..1b32870cd79 100644
--- a/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
+++ b/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
@@ -729,8 +729,6 @@ static char isNegatibleForFree(SDValue Op, bool LegalOperations,
case ISD::FMUL:
case ISD::FDIV:
- if (Options->HonorSignDependentRoundingFPMath()) return 0;
-
// fold (fneg (fmul X, Y)) -> (fmul (fneg X), Y) or (fmul X, (fneg Y))
if (char V = isNegatibleForFree(Op.getOperand(0), LegalOperations, TLI,
Options, Depth + 1))
@@ -792,8 +790,6 @@ static SDValue GetNegatedExpression(SDValue Op, SelectionDAG &DAG,
case ISD::FMUL:
case ISD::FDIV:
- assert(!Options.HonorSignDependentRoundingFPMath());
-
// fold (fneg (fmul X, Y)) -> (fmul (fneg X), Y)
if (isNegatibleForFree(Op.getOperand(0), LegalOperations,
DAG.getTargetLoweringInfo(), &Options, Depth+1))
OpenPOWER on IntegriCloud