mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-14 11:32:34 +00:00
Fix a case where were incorrectly compiled cast from short to int on 64-bit
targets. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20030 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
440e688b8d
commit
595dc5408a
@ -1071,9 +1071,11 @@ SDOperand SelectionDAGLegalize::PromoteOp(SDOperand Op) {
|
|||||||
Result = PromoteOp(Node->getOperand(0));
|
Result = PromoteOp(Node->getOperand(0));
|
||||||
// The high bits are not guaranteed to be anything. Insert an extend.
|
// The high bits are not guaranteed to be anything. Insert an extend.
|
||||||
if (Node->getOpcode() == ISD::SIGN_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
|
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;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
Loading…
Reference in New Issue
Block a user