f16 FDIV can now be legalized by promoting to f32

llvm-svn: 153064
This commit is contained in:
Pete Cooper 2012-03-19 23:38:12 +00:00
parent 8c3c65067d
commit e69be6df4f
1 changed files with 2 additions and 1 deletions

View File

@ -3600,10 +3600,11 @@ void SelectionDAGLegalize::PromoteNode(SDNode *Node) {
Tmp1, Tmp2, Node->getOperand(2)));
break;
}
case ISD::FDIV:
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);
Tmp3 = DAG.getNode(Node->getOpcode(), dl, NVT, Tmp1, Tmp2);
Results.push_back(DAG.getNode(ISD::FP_ROUND, dl, OVT,
Tmp3, DAG.getIntPtrConstant(0)));
break;