Fix a bug legalizing calls
authorChris Lattner <sabre@nondot.org>
Fri, 7 Jan 2005 21:34:13 +0000 (21:34 +0000)
committerChris Lattner <sabre@nondot.org>
Fri, 7 Jan 2005 21:34:13 +0000 (21:34 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19348 91177308-0d34-0410-b5e6-96231b3b80d8

lib/CodeGen/SelectionDAG/LegalizeDAG.cpp

index a3a758f0aad12fcf0220af0de7a64061bb3577b0..f31a2b4cd410a241e7c2f96ac697bc8ac90bc99a 100644 (file)
@@ -295,7 +295,7 @@ SDOperand SelectionDAGLegalize::LegalizeOp(SDOperand Op) {
       std::vector<MVT::ValueType> RetTyVTs;
       RetTyVTs.reserve(Node->getNumValues());
       for (unsigned i = 0, e = Node->getNumValues(); i != e; ++i)
-        RetTyVTs.push_back(Node->getValueType(0));
+        RetTyVTs.push_back(Node->getValueType(i));
       Result = SDOperand(DAG.getCall(RetTyVTs, Tmp1, Tmp2), Op.ResNo);
     }
     break;