mirror of
https://github.com/RPCS3/llvm.git
synced 2025-02-11 13:29:36 +00:00
Fix CodeGen/Generic/2005-12-12-ExpandSextInreg.ll
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24677 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
a92dabb259
commit
58f7963b8b
@ -3197,6 +3197,16 @@ void SelectionDAGLegalize::ExpandOp(SDOperand Op, SDOperand &Lo, SDOperand &Hi){
|
||||
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);
|
||||
Lo = DAG.getNode(ISD::ADD, NVT, // ctpop(HL) -> ctpop(H)+ctpop(L)
|
||||
|
Loading…
x
Reference in New Issue
Block a user