diff options
author | Chris Lattner <sabre@nondot.org> | 2005-01-14 22:38:01 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2005-01-14 22:38:01 +0000 |
commit | 69a52155d2eff066b49dbac385113002fd9dba14 (patch) | |
tree | c8576620cec0432b9c69b07100430530b75c597c /lib/CodeGen/SelectionDAG/SelectionDAG.cpp | |
parent | 7f2afac1dc0a9448badcfa0e1a98ccb89436ed47 (diff) |
Adjust to CopyFromReg changes, implement deletion of truncating/extending
stores/loads.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19562 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/SelectionDAG/SelectionDAG.cpp')
-rw-r--r-- | lib/CodeGen/SelectionDAG/SelectionDAG.cpp | 25 |
1 files changed, 24 insertions, 1 deletions
diff --git a/lib/CodeGen/SelectionDAG/SelectionDAG.cpp b/lib/CodeGen/SelectionDAG/SelectionDAG.cpp index 86a0120686..e1b52019e9 100644 --- a/lib/CodeGen/SelectionDAG/SelectionDAG.cpp +++ b/lib/CodeGen/SelectionDAG/SelectionDAG.cpp @@ -220,6 +220,29 @@ void SelectionDAG::DeleteNodeIfDead(SDNode *N, void *NodeSet) { N->getOperand(1)), cast<SetCCSDNode>(N)->getCondition())); break; + case ISD::TRUNCSTORE: { + EVTStruct NN; + NN.Opcode = ISD::TRUNCSTORE; + NN.VT = N->getValueType(0); + NN.EVT = cast<MVTSDNode>(N)->getExtraValueType(); + NN.Ops.push_back(N->getOperand(0)); + NN.Ops.push_back(N->getOperand(1)); + NN.Ops.push_back(N->getOperand(2)); + MVTSDNodes.erase(NN); + break; + } + case ISD::EXTLOAD: + case ISD::SEXTLOAD: + case ISD::ZEXTLOAD: { + EVTStruct NN; + NN.Opcode = N->getOpcode(); + NN.VT = N->getValueType(0); + NN.EVT = cast<MVTSDNode>(N)->getExtraValueType(); + NN.Ops.push_back(N->getOperand(0)); + NN.Ops.push_back(N->getOperand(1)); + MVTSDNodes.erase(NN); + break; + } default: if (N->getNumOperands() == 1) UnaryOps.erase(std::make_pair(N->getOpcode(), @@ -861,7 +884,7 @@ SDOperand SelectionDAG::getNode(unsigned Opcode, MVT::ValueType VT,SDOperand N1, SDNode *&N = MVTSDNodes[NN]; if (N) return SDOperand(N, 0); - N = new MVTSDNode(Opcode, VT, N1, N2, EVT); + N = new MVTSDNode(Opcode, VT, MVT::Other, N1, N2, EVT); AllNodes.push_back(N); return SDOperand(N, 0); } |