Fix yet another memset issue.
authorChris Lattner <sabre@nondot.org>
Wed, 2 Feb 2005 03:44:41 +0000 (03:44 +0000)
committerChris Lattner <sabre@nondot.org>
Wed, 2 Feb 2005 03:44:41 +0000 (03:44 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19986 91177308-0d34-0410-b5e6-96231b3b80d8

lib/CodeGen/SelectionDAG/LegalizeDAG.cpp

index fb667f0081744598770ff6d28aaa1cdc82f8fbe7..63530deac713053c8649d328ed1b7a1da9353c37 100644 (file)
@@ -726,16 +726,25 @@ SDOperand SelectionDAGLegalize::LegalizeOp(SDOperand Op) {
     } else {
       Tmp3 = LegalizeOp(Node->getOperand(2));    // memcpy/move = pointer, 
     }
-    SDOperand Tmp4, Tmp5;
-    
-    switch (getTypeAction(Node->getOperand(3).getValueType())) {  // uint
+
+    SDOperand Tmp4;
+    switch (getTypeAction(Node->getOperand(3).getValueType())) {
     case Expand: assert(0 && "Cannot expand this yet!");
     case Legal:
       Tmp4 = LegalizeOp(Node->getOperand(3));
-      Tmp5 = LegalizeOp(Node->getOperand(4));
       break;
     case Promote:
       Tmp4 = PromoteOp(Node->getOperand(3));
+      break;
+    }
+
+    SDOperand Tmp5;
+    switch (getTypeAction(Node->getOperand(4).getValueType())) {  // uint
+    case Expand: assert(0 && "Cannot expand this yet!");
+    case Legal:
+      Tmp5 = LegalizeOp(Node->getOperand(4));
+      break;
+    case Promote:
       Tmp5 = PromoteOp(Node->getOperand(4));
       break;
     }