mirror of
https://github.com/RPCSX/llvm.git
synced 2025-02-04 19:38:22 +00:00
Legalize this correctly
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21859 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
1f38e5c431
commit
9b583b4910
@ -2173,7 +2173,9 @@ void SelectionDAGLegalize::ExpandOp(SDOperand Op, SDOperand &Lo, SDOperand &Hi){
|
||||
|
||||
case ISD::CTPOP:
|
||||
ExpandOp(Node->getOperand(0), Lo, Hi);
|
||||
Lo = DAG.getNode(ISD::ADD, NVT, Lo, Hi);
|
||||
Lo = DAG.getNode(ISD::ADD, NVT, // ctpop(HL) -> ctpop(H)+ctpop(L)
|
||||
DAG.getNode(ISD::CTPOP, NVT, Lo),
|
||||
DAG.getNode(ISD::CTPOP, NVT, Hi));
|
||||
Hi = DAG.getConstant(0, NVT);
|
||||
break;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user