mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-12 17:32:19 +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:
|
case ISD::CTPOP:
|
||||||
ExpandOp(Node->getOperand(0), Lo, Hi);
|
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);
|
Hi = DAG.getConstant(0, NVT);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user