mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-09-28 23:17:10 +00:00
Implement the fpowi now by lowering to a libcall
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30225 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -2581,7 +2581,14 @@ SDOperand SelectionDAGLegalize::LegalizeOp(SDOperand Op) {
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
case ISD::FPOWI: {
|
||||||
|
// We always lower FPOWI into a libcall. No target support it yet.
|
||||||
|
const char *FnName = Node->getValueType(0) == MVT::f32
|
||||||
|
? "__powisf2" : "__powidf2";
|
||||||
|
SDOperand Dummy;
|
||||||
|
Result = ExpandLibCall(FnName, Node, Dummy);
|
||||||
|
break;
|
||||||
|
}
|
||||||
case ISD::BIT_CONVERT:
|
case ISD::BIT_CONVERT:
|
||||||
if (!isTypeLegal(Node->getOperand(0).getValueType())) {
|
if (!isTypeLegal(Node->getOperand(0).getValueType())) {
|
||||||
Result = ExpandBIT_CONVERT(Node->getValueType(0), Node->getOperand(0));
|
Result = ExpandBIT_CONVERT(Node->getValueType(0), Node->getOperand(0));
|
||||||
|
@@ -2404,6 +2404,7 @@ const char *SDNode::getOperationName(const SelectionDAG *G) const {
|
|||||||
case ISD::FSQRT: return "fsqrt";
|
case ISD::FSQRT: return "fsqrt";
|
||||||
case ISD::FSIN: return "fsin";
|
case ISD::FSIN: return "fsin";
|
||||||
case ISD::FCOS: return "fcos";
|
case ISD::FCOS: return "fcos";
|
||||||
|
case ISD::FPOWI: return "fpowi";
|
||||||
|
|
||||||
// Binary operators
|
// Binary operators
|
||||||
case ISD::ADD: return "add";
|
case ISD::ADD: return "add";
|
||||||
|
@@ -1620,6 +1620,13 @@ SelectionDAGLowering::visitIntrinsicCall(CallInst &I, unsigned Intrinsic) {
|
|||||||
getValue(I.getOperand(1)).getValueType(),
|
getValue(I.getOperand(1)).getValueType(),
|
||||||
getValue(I.getOperand(1))));
|
getValue(I.getOperand(1))));
|
||||||
return 0;
|
return 0;
|
||||||
|
case Intrinsic::powi_f32:
|
||||||
|
case Intrinsic::powi_f64:
|
||||||
|
setValue(&I, DAG.getNode(ISD::FPOWI,
|
||||||
|
getValue(I.getOperand(1)).getValueType(),
|
||||||
|
getValue(I.getOperand(1)),
|
||||||
|
getValue(I.getOperand(2))));
|
||||||
|
return 0;
|
||||||
case Intrinsic::pcmarker: {
|
case Intrinsic::pcmarker: {
|
||||||
SDOperand Tmp = getValue(I.getOperand(1));
|
SDOperand Tmp = getValue(I.getOperand(1));
|
||||||
DAG.setRoot(DAG.getNode(ISD::PCMARKER, MVT::Other, getRoot(), Tmp));
|
DAG.setRoot(DAG.getNode(ISD::PCMARKER, MVT::Other, getRoot(), Tmp));
|
||||||
|
Reference in New Issue
Block a user