don't zextload fp values!
authorChris Lattner <sabre@nondot.org>
Sun, 10 Apr 2005 17:40:35 +0000 (17:40 +0000)
committerChris Lattner <sabre@nondot.org>
Sun, 10 Apr 2005 17:40:35 +0000 (17:40 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21209 91177308-0d34-0410-b5e6-96231b3b80d8

lib/CodeGen/SelectionDAG/LegalizeDAG.cpp

index b551eebf7cb0296536efa4bd8e2750c3922c7562..f9229f72f59b163e2fc557e3e179caa0404597db 100644 (file)
@@ -1356,7 +1356,10 @@ SDOperand SelectionDAGLegalize::PromoteOp(SDOperand Op) {
     Tmp1 = LegalizeOp(Node->getOperand(0));   // Legalize the chain.
     Tmp2 = LegalizeOp(Node->getOperand(1));   // Legalize the pointer.
     // FIXME: When the DAG combiner exists, change this to use EXTLOAD!
-    Result = DAG.getNode(ISD::ZEXTLOAD, NVT, Tmp1, Tmp2, VT);
+    if (MVT::isInteger(NVT))
+      Result = DAG.getNode(ISD::ZEXTLOAD, NVT, Tmp1, Tmp2, VT);
+    else
+      Result = DAG.getNode(ISD::EXTLOAD, NVT, Tmp1, Tmp2, VT);
 
     // Remember that we legalized the chain.
     AddLegalizedOperand(Op.getValue(1), Result.getValue(1));