diff options
| author | Dan Gohman <gohman@apple.com> | 2008-03-11 01:59:03 +0000 |
|---|---|---|
| committer | Dan Gohman <gohman@apple.com> | 2008-03-11 01:59:03 +0000 |
| commit | d6819da4538beaad75c46375eb4eae28c06137c4 (patch) | |
| tree | c9b115a29b0c421dc237f5f0b8c9f4de8a483acb /llvm/lib/Target/PowerPC | |
| parent | d3090bcfc8ccafac28cdd07072f6725ec7ee7f0b (diff) | |
| download | bcm5719-llvm-d6819da4538beaad75c46375eb4eae28c06137c4.tar.gz bcm5719-llvm-d6819da4538beaad75c46375eb4eae28c06137c4.zip | |
Generalize ExpandIntToFP to handle the case where the operand is legal
and it's the result that requires expansion. This code is a little confusing
because the TargetLoweringInfo tables for [US]INT_TO_FP use the operand type
(the integer type) rather than the result type.
llvm-svn: 48206
Diffstat (limited to 'llvm/lib/Target/PowerPC')
| -rw-r--r-- | llvm/lib/Target/PowerPC/PPCISelLowering.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/llvm/lib/Target/PowerPC/PPCISelLowering.cpp b/llvm/lib/Target/PowerPC/PPCISelLowering.cpp index 32787bcc75b..a224b036926 100644 --- a/llvm/lib/Target/PowerPC/PPCISelLowering.cpp +++ b/llvm/lib/Target/PowerPC/PPCISelLowering.cpp @@ -2380,6 +2380,10 @@ SDOperand PPCTargetLowering::LowerFP_ROUND_INREG(SDOperand Op, } SDOperand PPCTargetLowering::LowerSINT_TO_FP(SDOperand Op, SelectionDAG &DAG) { + // Don't handle ppc_fp128 here; let it be lowered to a libcall. + if (Op.getValueType() != MVT::f32 && Op.getValueType() != MVT::f64) + return SDOperand(); + if (Op.getOperand(0).getValueType() == MVT::i64) { SDOperand Bits = DAG.getNode(ISD::BIT_CONVERT, MVT::f64, Op.getOperand(0)); SDOperand FP = DAG.getNode(PPCISD::FCFID, MVT::f64, Bits); |

