diff options
author | Chris Lattner <sabre@nondot.org> | 2005-04-02 04:00:59 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2005-04-02 04:00:59 +0000 |
commit | 4157c417a12f0479bfba3b5520413e9897b8a3ee (patch) | |
tree | 457be28e1424a06ac09f5cff70ffdacf36a49df2 /llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp | |
parent | 6f28fd388a1652bba2de39c69e98c8e4c61300de (diff) | |
download | bcm5719-llvm-4157c417a12f0479bfba3b5520413e9897b8a3ee.tar.gz bcm5719-llvm-4157c417a12f0479bfba3b5520413e9897b8a3ee.zip |
fix some bugs in the implementation of SHL_PARTS and friends.
llvm-svn: 21004
Diffstat (limited to 'llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp')
-rw-r--r-- | llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp b/llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp index 7f15e19f9d5..005bb725753 100644 --- a/llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp +++ b/llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp @@ -907,6 +907,14 @@ SDOperand SelectionDAG::getNode(unsigned Opcode, MVT::ValueType VT, case ISD::DYNAMIC_STACKALLOC: // DYNAMIC_STACKALLOC produces pointer and chain N->setValueTypes(VT, MVT::Other); break; + + case ISD::SRA_PARTS: + case ISD::SRL_PARTS: + case ISD::SHL_PARTS: { + std::vector<MVT::ValueType> V(N->getNumOperands()-1, VT); + N->setValueTypes(V); + break; + } } // FIXME: memoize NODES @@ -924,9 +932,7 @@ SDOperand SelectionDAG::getNode(unsigned Opcode, MVT::ValueType VT, default: // FIXME: MEMOIZE!! SDNode *N = new SDNode(Opcode, Children); - if (Opcode != ISD::ADD_PARTS && Opcode != ISD::SUB_PARTS && - Opcode != ISD::SRA_PARTS && Opcode != ISD::SRL_PARTS && - Opcode != ISD::SHL_PARTS) { + if (Opcode != ISD::ADD_PARTS && Opcode != ISD::SUB_PARTS) { N->setValueTypes(VT); } else { std::vector<MVT::ValueType> V(N->getNumOperands()/2, VT); |