diff options
author | Dale Johannesen <dalej@apple.com> | 2007-10-11 18:07:22 +0000 |
---|---|---|
committer | Dale Johannesen <dalej@apple.com> | 2007-10-11 18:07:22 +0000 |
commit | a471c2ecda37cd1bae0d94e832f002caa7b63216 (patch) | |
tree | 5585aa5c69106bf208bebbc089dccd54bd09154b /lib/CodeGen/SelectionDAG/LegalizeDAG.cpp | |
parent | f9193de25bcd2c7de6c7d60ec5992f546907231a (diff) |
Next PPC long double bits. First cut at constants.
No compile-time support for constant operations yet,
just format transformations. Make readers and
writers work. Split constants into 2 doubles in
Legalize.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42865 91177308-0d34-0410-b5e6-96231b3b80d8
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); |