summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
diff options
context:
space:
mode:
authorOwen Anderson <resistor@mac.com>2015-04-30 04:06:32 +0000
committerOwen Anderson <resistor@mac.com>2015-04-30 04:06:32 +0000
commitd8a029c81ba59fa53847ab7784ff5fb81ea0d1fe (patch)
tree4b36703e8563f45c2f4ef2ffde15f1725e80117d /llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
parent66beaa93490dd706199efea02a89bc13286cb687 (diff)
downloadbcm5719-llvm-d8a029c81ba59fa53847ab7784ff5fb81ea0d1fe.tar.gz
bcm5719-llvm-d8a029c81ba59fa53847ab7784ff5fb81ea0d1fe.zip
Semantically revert r236031, which is not a good idea for in-order targets.
At the least it should be guarded by some kind of target hook. It also introduced catastrophic compile time and code quality regressions on some out of tree targets (test case still being reduced/sanitized). Sanjay agreed with reverting this patch until these issues can be resolved. llvm-svn: 236199
Diffstat (limited to 'llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp')
-rw-r--r--llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp31
1 files changed, 0 insertions, 31 deletions
diff --git a/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp b/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
index 2a9f8e1d304..a5f558fb79c 100644
--- a/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
+++ b/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
@@ -7647,33 +7647,6 @@ SDValue DAGCombiner::visitFSUBForFMACombine(SDNode *N) {
return SDValue();
}
-static SDValue ReassociateBinops(SDNode *N, SelectionDAG &DAG) {
- assert(N->getNumOperands() == 2 && "Invalid node for binop reassociation");
- SDValue N0 = N->getOperand(0);
- SDValue N1 = N->getOperand(1);
- EVT VT = N->getValueType(0);
- SDLoc DL(N);
- unsigned Opcode = N->getOpcode();
-
- // Canonicalize chains of this operation to LHS to allow the following fold.
- if (N0.getOpcode() != Opcode && N1.getOpcode() == Opcode)
- return DAG.getNode(Opcode, DL, VT, N1, N0);
-
- // Convert a chain of 3 dependent operations into 2 independent operations
- // and 1 dependent operation:
- // (op N0: (op N00: (op z, w), N01: y), N1: x) ->
- // (op N00: (op z, w), (op N1: x, N01: y))
- if (N0.getOpcode() == Opcode && N0.hasOneUse() && N1.getOpcode() != Opcode) {
- SDValue N00 = N0.getOperand(0);
- if (N00.getOpcode() == Opcode) {
- SDValue N01 = N0.getOperand(1);
- SDValue NewOp = DAG.getNode(Opcode, DL, VT, N1, N01);
- return DAG.getNode(Opcode, DL, VT, N00, NewOp);
- }
- }
- return SDValue();
-}
-
SDValue DAGCombiner::visitFADD(SDNode *N) {
SDValue N0 = N->getOperand(0);
SDValue N1 = N->getOperand(1);
@@ -7808,10 +7781,6 @@ SDValue DAGCombiner::visitFADD(SDNode *N) {
N0.getOperand(0), DAG.getConstantFP(4.0, DL, VT));
}
}
-
- if (SDValue Reassociated = ReassociateBinops(N, DAG))
- return Reassociated;
-
} // enable-unsafe-fp-math
// FADD -> FMA combines:
OpenPOWER on IntegriCloud