summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen
diff options
context:
space:
mode:
authorSanjay Patel <spatel@rotateright.com>2019-05-01 16:06:21 +0000
committerSanjay Patel <spatel@rotateright.com>2019-05-01 16:06:21 +0000
commit64d57512546e42f45e1f5498e443bc5c580f84f1 (patch)
tree1b590ffcfeead851701456f752ab8ded87b88f13 /llvm/lib/CodeGen
parentf5bdff7747883d30dc7c9582333414cb7e25b594 (diff)
downloadbcm5719-llvm-64d57512546e42f45e1f5498e443bc5c580f84f1.tar.gz
bcm5719-llvm-64d57512546e42f45e1f5498e443bc5c580f84f1.zip
Revert "[DAGCombiner] try repeated fdiv divisor transform before building estimate"
This reverts commit fb9a5307a94e6f1f850e4d89f79103b123f16279 (rL359398) because it can cause an infinite loop due to opposing combines. llvm-svn: 359695
Diffstat (limited to 'llvm/lib/CodeGen')
-rw-r--r--llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp b/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
index aeab54d65a8..d1e71237fe8 100644
--- a/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
+++ b/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
@@ -11993,9 +11993,6 @@ SDValue DAGCombiner::visitFDIV(SDNode *N) {
if (SDValue NewSel = foldBinOpIntoSelect(N))
return NewSel;
- if (SDValue V = combineRepeatedFPDivisors(N))
- return V;
-
if (Options.UnsafeFPMath || Flags.hasAllowReciprocal()) {
// fold (fdiv X, c2) -> fmul X, 1/c2 if losing precision is acceptable.
if (N1CFP) {
@@ -12085,6 +12082,9 @@ SDValue DAGCombiner::visitFDIV(SDNode *N) {
}
}
+ if (SDValue CombineRepeatedDivisors = combineRepeatedFPDivisors(N))
+ return CombineRepeatedDivisors;
+
return SDValue();
}
OpenPOWER on IntegriCloud