diff options
author | Dale Johannesen <dalej@apple.com> | 2008-04-20 18:23:46 +0000 |
---|---|---|
committer | Dale Johannesen <dalej@apple.com> | 2008-04-20 18:23:46 +0000 |
commit | 9dd2ce46c58dd05f0835df77f308396715890d66 (patch) | |
tree | 8e247380ad7b0e891b7a45d5eb1fec51b9e7410a /lib/CodeGen/SelectionDAG/SelectionDAG.cpp | |
parent | 5913e6c5dbaff88ac00d5e679382abc72323831a (diff) |
Check we aren't trying to convert PPC long double.
This fixes the testsuite failure on ppcf128-4.ll.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49994 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/SelectionDAG/SelectionDAG.cpp')
-rw-r--r-- | lib/CodeGen/SelectionDAG/SelectionDAG.cpp | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/lib/CodeGen/SelectionDAG/SelectionDAG.cpp b/lib/CodeGen/SelectionDAG/SelectionDAG.cpp index fa38c50848..90d64832d7 100644 --- a/lib/CodeGen/SelectionDAG/SelectionDAG.cpp +++ b/lib/CodeGen/SelectionDAG/SelectionDAG.cpp @@ -74,12 +74,9 @@ bool ConstantFPSDNode::isValueValidForType(MVT::ValueType VT, const APFloat& Val) { assert(MVT::isFloatingPoint(VT) && "Can only convert between FP types"); - // Anything can be extended to ppc long double. - if (VT == MVT::ppcf128) - return true; - - // PPC long double cannot be shrunk to anything though. - if (&Val.getSemantics() == &APFloat::PPCDoubleDouble) + // PPC long double cannot be converted to any other type. + if (VT == MVT::ppcf128 || + &Val.getSemantics() == &APFloat::PPCDoubleDouble) return false; // convert modifies in place, so make a copy. |