diff options
author | Nate Begeman <natebegeman@mac.com> | 2005-09-09 19:49:52 +0000 |
---|---|---|
committer | Nate Begeman <natebegeman@mac.com> | 2005-09-09 19:49:52 +0000 |
commit | 049b748c76050a3c35ca5b3c7d0d526e1addd73f (patch) | |
tree | 711af295f7a7cbdcb472ba9be9256935787871fa /llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp | |
parent | ce3662f2a2f2942400e2332eb7ce2e595b1199d6 (diff) | |
download | bcm5719-llvm-049b748c76050a3c35ca5b3c7d0d526e1addd73f.tar.gz bcm5719-llvm-049b748c76050a3c35ca5b3c7d0d526e1addd73f.zip |
Last round of 2-node folds from SD.cpp. Will move on to 3 node ops such
as setcc and select next.
llvm-svn: 23295
Diffstat (limited to 'llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp')
-rw-r--r-- | llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp b/llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp index 055caad70a2..ae0c2c8d712 100644 --- a/llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp +++ b/llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp @@ -1310,10 +1310,10 @@ SDOperand SelectionDAG::getNode(unsigned Opcode, MVT::ValueType VT, } } + if (!CombinerEnabled) { if (N2C) { uint64_t C2 = N2C->getValue(); - if (!CombinerEnabled) { switch (Opcode) { case ISD::ADD: if (!C2) return N1; // add X, 0 -> X @@ -1486,7 +1486,7 @@ SDOperand SelectionDAG::getNode(unsigned Opcode, MVT::ValueType VT, if (ConstantSDNode *N3C = dyn_cast<ConstantSDNode>(N1.Val->getOperand(1))) return getNode(Opcode, VT, N1.Val->getOperand(0), getNode(Opcode, VT, N2, N1.Val->getOperand(1))); - } + } } ConstantFPSDNode *N1CFP = dyn_cast<ConstantFPSDNode>(N1.Val); @@ -1533,6 +1533,7 @@ SDOperand SelectionDAG::getNode(unsigned Opcode, MVT::ValueType VT, case ISD::AND: case ISD::OR: + if (!CombinerEnabled) { if (N1.Val->getOpcode() == ISD::SETCC && N2.Val->getOpcode() == ISD::SETCC){ SDNode *LHS = N1.Val, *RHS = N2.Val; SDOperand LL = LHS->getOperand(0), RL = RHS->getOperand(0); @@ -1595,6 +1596,7 @@ SDOperand SelectionDAG::getNode(unsigned Opcode, MVT::ValueType VT, return getNode(ISD::ZERO_EXTEND, VT, getNode(Opcode, N1.getOperand(0).getValueType(), N1.getOperand(0), N2.getOperand(0))); + } break; case ISD::XOR: if (!CombinerEnabled) { |