1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-20 19:42:54 +02:00

Fix CodeGen/Generic/2005-12-12-ExpandSextInreg.ll

llvm-svn: 24677
This commit is contained in:
Chris Lattner 2005-12-12 22:27:43 +00:00
parent 31de4bc6e3
commit ea3d25b64a

View File

@ -3196,6 +3196,16 @@ void SelectionDAGLegalize::ExpandOp(SDOperand Op, SDOperand &Lo, SDOperand &Hi){
Lo = LegalizeOp(Node->getOperand(0));
Hi = LegalizeOp(Node->getOperand(1));
break;
case ISD::SIGN_EXTEND_INREG:
ExpandOp(Node->getOperand(0), Lo, Hi);
// Sign extend the lo-part.
Hi = DAG.getNode(ISD::SRA, NVT, Lo,
DAG.getConstant(MVT::getSizeInBits(NVT)-1,
TLI.getShiftAmountTy()));
// sext_inreg the low part if needed.
Lo = DAG.getNode(ISD::SIGN_EXTEND_INREG, NVT, Lo, Node->getOperand(1));
break;
case ISD::CTPOP:
ExpandOp(Node->getOperand(0), Lo, Hi);