aboutsummaryrefslogtreecommitdiff
path: root/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2005-04-02 04:00:59 +0000
committerChris Lattner <sabre@nondot.org>2005-04-02 04:00:59 +0000
commit5b359c6c4f052e41579ad7da9af37db4f54207d9 (patch)
treeee42b29d4d1594f236864339afbb61db33015652 /lib/CodeGen/SelectionDAG/SelectionDAG.cpp
parent6b8f2d649c1e96e0222be9de1e5d6c79e3eef021 (diff)
fix some bugs in the implementation of SHL_PARTS and friends.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21004 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/SelectionDAG/SelectionDAG.cpp')
-rw-r--r--lib/CodeGen/SelectionDAG/SelectionDAG.cpp12
1 files changed, 9 insertions, 3 deletions
diff --git a/lib/CodeGen/SelectionDAG/SelectionDAG.cpp b/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
index 7f15e19f9d..005bb72575 100644
--- a/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
+++ b/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);