Use getExtLoad here instead of getNode, as extloads produce two values. This

fixes a legalize failure on SPASS for itanium.

llvm-svn: 23747
This commit is contained in:
Chris Lattner 2005-10-15 20:24:07 +00:00
parent e33870d154
commit b986f471be
1 changed files with 3 additions and 2 deletions

View File

@ -2355,8 +2355,9 @@ SDOperand SelectionDAGLegalize::PromoteOp(SDOperand Op) {
case ISD::EXTLOAD:
Tmp1 = LegalizeOp(Node->getOperand(0)); // Legalize the chain.
Tmp2 = LegalizeOp(Node->getOperand(1)); // Legalize the pointer.
Result = DAG.getNode(Node->getOpcode(), NVT, Tmp1, Tmp2,
Node->getOperand(2), Node->getOperand(3));
Result = DAG.getExtLoad(Node->getOpcode(), NVT, Tmp1, Tmp2,
Node->getOperand(2),
cast<VTSDNode>(Node->getOperand(3))->getVT());
// Remember that we legalized the chain.
AddLegalizedOperand(Op.getValue(1), Result.getValue(1));
break;