forked from OSchip/llvm-project
Fix a case where were incorrectly compiled cast from short to int on 64-bit
targets. llvm-svn: 20030
This commit is contained in:
parent
5152be292a
commit
0559691163
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue