OSDN Git Service

Fix another bug in extload promotion.
authorChris Lattner <sabre@nondot.org>
Tue, 10 Oct 2006 18:54:19 +0000 (18:54 +0000)
committerChris Lattner <sabre@nondot.org>
Tue, 10 Oct 2006 18:54:19 +0000 (18:54 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30857 91177308-0d34-0410-b5e6-96231b3b80d8

lib/CodeGen/SelectionDAG/LegalizeDAG.cpp

index 699d5b1..d6b07a0 100644 (file)
@@ -3237,7 +3237,8 @@ SDOperand SelectionDAGLegalize::PromoteOp(SDOperand Op) {
       ? ISD::EXTLOAD : LD->getExtensionType();
     Result = DAG.getExtLoad(ExtType, NVT,
                             LD->getChain(), LD->getBasePtr(),
-                            LD->getSrcValue(), LD->getSrcValueOffset(), VT);
+                            LD->getSrcValue(), LD->getSrcValueOffset(),
+                            LD->getLoadVT());
     // Remember that we legalized the chain.
     AddLegalizedOperand(Op.getValue(1), LegalizeOp(Result.getValue(1)));
     break;