From 0c089eae41ca02927677120833fd7b2ddf7b4828 Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Sun, 10 Apr 2005 04:33:47 +0000 Subject: [PATCH] Until we have a dag combiner, promote using zextload's instead of extloads. This gives the optimizer a bit of information about the top-part of the value. llvm-svn: 21205 --- lib/CodeGen/SelectionDAG/LegalizeDAG.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp b/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp index 1fcaa723e2c..b551eebf7cb 100644 --- a/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp +++ b/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp @@ -1355,7 +1355,8 @@ SDOperand SelectionDAGLegalize::PromoteOp(SDOperand Op) { case ISD::LOAD: Tmp1 = LegalizeOp(Node->getOperand(0)); // Legalize the chain. Tmp2 = LegalizeOp(Node->getOperand(1)); // Legalize the pointer. - Result = DAG.getNode(ISD::EXTLOAD, NVT, Tmp1, Tmp2, VT); + // FIXME: When the DAG combiner exists, change this to use EXTLOAD! + Result = DAG.getNode(ISD::ZEXTLOAD, NVT, Tmp1, Tmp2, VT); // Remember that we legalized the chain. AddLegalizedOperand(Op.getValue(1), Result.getValue(1));