Only get Tmp2 for cases where number of operands is > 1. Fixed return void.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27586 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Evan Cheng 2006-04-11 06:33:39 +00:00
parent a5bbbcea44
commit 98f8aeb45f

View File

@ -1397,10 +1397,10 @@ SDOperand SelectionDAGLegalize::LegalizeOp(SDOperand Op) {
Tmp1 = DAG.getNode(ISD::TokenFactor, MVT::Other, Tmp1, LastCALLSEQ_END);
Tmp1 = LegalizeOp(Tmp1);
LastCALLSEQ_END = DAG.getEntryNode();
Tmp2 = Node->getOperand(1);
switch (Node->getNumOperands()) {
case 2: // ret val
Tmp2 = Node->getOperand(1);
switch (getTypeAction(Tmp2.getValueType())) {
case Legal:
Result = DAG.UpdateNodeOperands(Result, Tmp1, LegalizeOp(Tmp2));