diff options
author | Andrew Lenharth <andrewl@lenharth.org> | 2006-01-23 21:51:14 +0000 |
---|---|---|
committer | Andrew Lenharth <andrewl@lenharth.org> | 2006-01-23 21:51:14 +0000 |
commit | 683352382ee6ee4acbbbc884083ad9d259598fbe (patch) | |
tree | 0b89af6e156efa66e22a8b07d790f7af06f0412f /llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp | |
parent | 208bbe9ca93a4fb30b3a76684d8ae0a3897c341a (diff) | |
download | bcm5719-llvm-683352382ee6ee4acbbbc884083ad9d259598fbe.tar.gz bcm5719-llvm-683352382ee6ee4acbbbc884083ad9d259598fbe.zip |
another couple selects
llvm-svn: 25551
Diffstat (limited to 'llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp')
-rw-r--r-- | llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp b/llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp index 3165fc1d651..c1ba5ebc4ab 100644 --- a/llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp +++ b/llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp @@ -1671,6 +1671,28 @@ SDOperand SelectionDAG::SelectNodeTo(SDNode *N, unsigned TargetOpc, ON = N; // Memoize the new node. return SDOperand(N, 0); } +SDOperand SelectionDAG::SelectNodeTo(SDNode *N, unsigned TargetOpc, + MVT::ValueType VT, SDOperand Op1, + SDOperand Op2, SDOperand Op3,SDOperand Op4, + SDOperand Op5, SDOperand Op6, + SDOperand Op7, SDOperand Op8) { + // If an identical node already exists, use it. + std::vector<SDOperand> OpList; + OpList.push_back(Op1); OpList.push_back(Op2); OpList.push_back(Op3); + OpList.push_back(Op4); OpList.push_back(Op5); OpList.push_back(Op6); + OpList.push_back(Op7); OpList.push_back(Op8); + SDNode *&ON = OneResultNodes[std::make_pair(ISD::BUILTIN_OP_END+TargetOpc, + std::make_pair(VT, OpList))]; + if (ON) return SDOperand(ON, 0); + + RemoveNodeFromCSEMaps(N); + N->MorphNodeTo(ISD::BUILTIN_OP_END+TargetOpc); + N->setValueTypes(VT); + N->setOperands(Op1, Op2, Op3, Op4, Op5, Op6, Op7, Op8); + + ON = N; // Memoize the new node. + return SDOperand(N, 0); +} SDOperand SelectionDAG::SelectNodeTo(SDNode *N, unsigned TargetOpc, MVT::ValueType VT1, MVT::ValueType VT2, |