mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-15 20:29:48 +00:00
implement legalization of truncates whose results and sources need to be
truncated, e.g. (truncate:i8 something:i16) on a 32 or 64-bit RISC. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19879 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
e560521f1a
commit
e76ad6de40
@ -1035,10 +1035,13 @@ SDOperand SelectionDAGLegalize::PromoteOp(SDOperand Op) {
|
|||||||
if (Result.getValueType() > NVT) // Truncate to NVT instead of VT
|
if (Result.getValueType() > NVT) // Truncate to NVT instead of VT
|
||||||
Result = DAG.getNode(ISD::TRUNCATE, NVT, Result);
|
Result = DAG.getNode(ISD::TRUNCATE, NVT, Result);
|
||||||
break;
|
break;
|
||||||
|
case Promote:
|
||||||
|
// The truncation is not required, because we don't guarantee anything
|
||||||
|
// about high bits anyway.
|
||||||
|
Result = PromoteOp(Node->getOperand(0));
|
||||||
|
break;
|
||||||
case Expand:
|
case Expand:
|
||||||
assert(0 && "Cannot handle expand yet");
|
assert(0 && "Cannot handle expand yet");
|
||||||
case Promote:
|
|
||||||
assert(0 && "Cannot handle promote-promote yet");
|
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case ISD::SIGN_EXTEND:
|
case ISD::SIGN_EXTEND:
|
||||||
|
Loading…
Reference in New Issue
Block a user