From b986f471be6b454d2d7477700fbc7019afd9c9a4 Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Sat, 15 Oct 2005 20:24:07 +0000 Subject: [PATCH] Use getExtLoad here instead of getNode, as extloads produce two values. This fixes a legalize failure on SPASS for itanium. llvm-svn: 23747 --- llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp b/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp index b02fac1c049f..8c7f761f833b 100644 --- a/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp +++ b/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp @@ -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(Node->getOperand(3))->getVT()); // Remember that we legalized the chain. AddLegalizedOperand(Op.getValue(1), Result.getValue(1)); break;