diff options
| author | Dale Johannesen <dalej@apple.com> | 2008-01-20 01:18:38 +0000 |
|---|---|---|
| committer | Dale Johannesen <dalej@apple.com> | 2008-01-20 01:18:38 +0000 |
| commit | 949e5a2f8a02ff9e74bd5dac0f6670a319a4a611 (patch) | |
| tree | a600bc4076654afbaa11f2861fcd6fc891041e17 /llvm/lib/CodeGen | |
| parent | 7d2b746f08b28a3830a99a39869511109d017463 (diff) | |
| download | bcm5719-llvm-949e5a2f8a02ff9e74bd5dac0f6670a319a4a611.tar.gz bcm5719-llvm-949e5a2f8a02ff9e74bd5dac0f6670a319a4a611.zip | |
Do not generate a FP_ROUND of f64 to f64.
llvm-svn: 46195
Diffstat (limited to 'llvm/lib/CodeGen')
| -rw-r--r-- | llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp b/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp index 8d7c85ce936..222a23dc2a8 100644 --- a/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp +++ b/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp @@ -3608,10 +3608,11 @@ SDOperand SelectionDAGLegalize::LegalizeOp(SDOperand Op) { MVT::ValueType SrcVT = Op.getOperand(0).getValueType(); if (TLI.getConvertAction(SrcVT, DstVT) == TargetLowering::Expand) { if (SrcVT == MVT::ppcf128) { - SDOperand Lo, Hi; - ExpandOp(Node->getOperand(0), Lo, Hi); + SDOperand Lo; + ExpandOp(Node->getOperand(0), Lo, Result); // Round it the rest of the way (e.g. to f32) if needed. - Result = DAG.getNode(ISD::FP_ROUND, DstVT, Hi, Op.getOperand(1)); + if (DstVT!=MVT::f64) + Result = DAG.getNode(ISD::FP_ROUND, DstVT, Result, Op.getOperand(1)); break; } // The only other way we can lower this is to turn it into a STORE, |

