Fix a case where were incorrectly compiled cast from short to int on 64-bit

targets.

llvm-svn: 20030
This commit is contained in:
Chris Lattner 2005-02-04 18:39:19 +00:00
parent 5152be292a
commit 0559691163
1 changed files with 4 additions and 2 deletions

View File

@ -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;