diff options
Diffstat (limited to 'lib/CodeGen/SelectionDAG/LegalizeDAG.cpp')
-rw-r--r-- | lib/CodeGen/SelectionDAG/LegalizeDAG.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp b/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp index ce28c79dc9..87f39483cf 100644 --- a/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp +++ b/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp @@ -5196,6 +5196,14 @@ void SelectionDAGLegalize::ExpandOp(SDOperand Op, SDOperand &Lo, SDOperand &Hi){ } case ISD::ConstantFP: { ConstantFPSDNode *CFP = cast<ConstantFPSDNode>(Node); + if (CFP->getValueType(0) == MVT::ppcf128) { + APInt api = CFP->getValueAPF().convertToAPInt(); + Lo = DAG.getConstantFP(APFloat(APInt(64, 1, &api.getRawData()[1])), + MVT::f64); + Hi = DAG.getConstantFP(APFloat(APInt(64, 1, &api.getRawData()[0])), + MVT::f64); + break; + } Lo = ExpandConstantFP(CFP, false, DAG, TLI); if (getTypeAction(Lo.getValueType()) == Expand) ExpandOp(Lo, Lo, Hi); |