Use getExtLoad here instead of getNode, as extloads produce two values. This
authorChris Lattner <sabre@nondot.org>
Sat, 15 Oct 2005 20:24:07 +0000 (20:24 +0000)
committerChris Lattner <sabre@nondot.org>
Sat, 15 Oct 2005 20:24:07 +0000 (20:24 +0000)
fixes a legalize failure on SPASS for itanium.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23747 91177308-0d34-0410-b5e6-96231b3b80d8

lib/CodeGen/SelectionDAG/LegalizeDAG.cpp

index b02fac1c049fc776b2b727e6c9616cc69c41d73e..8c7f761f833b9ba37c6f75b8eba5dd24fac0fe1f 100644 (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;