Handle expanding arguments to ISD::TRUNCATE. This happens on PowerPC when

you have something like i16 = truncate i64.  This fixes Regression/C/casts

llvm-svn: 21073
This commit is contained in:
Nate Begeman 2005-04-04 00:57:08 +00:00
parent 4784489de2
commit cc00a7c42d
1 changed files with 3 additions and 1 deletions

View File

@ -1126,7 +1126,9 @@ SDOperand SelectionDAGLegalize::PromoteOp(SDOperand Op) {
Result = PromoteOp(Node->getOperand(0));
break;
case Expand:
assert(0 && "Cannot handle expand yet");
ExpandOp(Node->getOperand(0), Tmp1, Tmp2);
// Truncate the low part of the expanded value to the result type
Result = DAG.getNode(ISD::TRUNCATE, VT, Tmp1);
}
break;
case ISD::SIGN_EXTEND: