summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2005-02-04 18:39:19 +0000
committerChris Lattner <sabre@nondot.org>2005-02-04 18:39:19 +0000
commit0559691163b6cd1008a63130c5782389e9a08245 (patch)
tree146e0684b839e101f69b567fd97c122766268c3b /llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
parent5152be292ac0ac686aa2891fd2e6f596a946bc20 (diff)
downloadbcm5719-llvm-0559691163b6cd1008a63130c5782389e9a08245.tar.gz
bcm5719-llvm-0559691163b6cd1008a63130c5782389e9a08245.zip
Fix a case where were incorrectly compiled cast from short to int on 64-bit
targets. llvm-svn: 20030
Diffstat (limited to 'llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp')
-rw-r--r--llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp b/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
index 63530deac71..1e976e3f680 100644
--- a/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
+++ b/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
@@ -1071,9 +1071,11 @@ SDOperand SelectionDAGLegalize::PromoteOp(SDOperand Op) {
Result = PromoteOp(Node->getOperand(0));
// The high bits are not guaranteed to be anything. Insert an extend.
if (Node->getOpcode() == ISD::SIGN_EXTEND)
- Result = DAG.getNode(ISD::SIGN_EXTEND_INREG, NVT, Result, VT);
+ Result = DAG.getNode(ISD::SIGN_EXTEND_INREG, NVT, Result,
+ Node->getOperand(0).getValueType());
else
- Result = DAG.getNode(ISD::ZERO_EXTEND_INREG, NVT, Result, VT);
+ Result = DAG.getNode(ISD::ZERO_EXTEND_INREG, NVT, Result,
+ Node->getOperand(0).getValueType());
break;
}
break;
OpenPOWER on IntegriCloud