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
diff --git a/lib/CodeGen/SelectionDAG/SelectionDAG.cpp b/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
index 7f15e19..005bb72 100644
--- a/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
+++ b/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
@@ -907,6 +907,14 @@
   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 @@
   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);