mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-08-09 11:25:55 +00:00
Added FPOW, FEXP, FLOG to PromoteNode so that custom actions can be set to Promote for those operations.
Sorry, no test case yet git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@148050 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -3592,6 +3592,24 @@ void SelectionDAGLegalize::PromoteNode(SDNode *Node) {
|
|||||||
Tmp1, Tmp2, Node->getOperand(2)));
|
Tmp1, Tmp2, Node->getOperand(2)));
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
case ISD::FPOW: {
|
||||||
|
Tmp1 = DAG.getNode(ISD::FP_EXTEND, dl, NVT, Node->getOperand(0));
|
||||||
|
Tmp2 = DAG.getNode(ISD::FP_EXTEND, dl, NVT, Node->getOperand(1));
|
||||||
|
Tmp3 = DAG.getNode(ISD::FPOW, dl, NVT, Tmp1, Tmp2);
|
||||||
|
Results.push_back(DAG.getNode(ISD::FP_ROUND, dl, OVT,
|
||||||
|
Tmp3, DAG.getIntPtrConstant(0)));
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case ISD::FLOG2:
|
||||||
|
case ISD::FEXP2:
|
||||||
|
case ISD::FLOG:
|
||||||
|
case ISD::FEXP: {
|
||||||
|
Tmp1 = DAG.getNode(ISD::FP_EXTEND, dl, NVT, Node->getOperand(0));
|
||||||
|
Tmp2 = DAG.getNode(Node->getOpcode(), dl, NVT, Tmp1);
|
||||||
|
Results.push_back(DAG.getNode(ISD::FP_ROUND, dl, OVT,
|
||||||
|
Tmp2, DAG.getIntPtrConstant(0)));
|
||||||
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Replace the original node with the legalized result.
|
// Replace the original node with the legalized result.
|
||||||
|
Reference in New Issue
Block a user