summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
diff options
context:
space:
mode:
authorDale Johannesen <dalej@apple.com>2008-04-20 18:23:46 +0000
committerDale Johannesen <dalej@apple.com>2008-04-20 18:23:46 +0000
commitaac27592f0541a5449debaf1ffa0fa1296fb8a74 (patch)
tree99c6c5438d57badb7f50d59fa844e453b9998b42 /llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
parentf77618e6e895035d353945de7cc3a9814355b07b (diff)
downloadbcm5719-llvm-aac27592f0541a5449debaf1ffa0fa1296fb8a74.tar.gz
bcm5719-llvm-aac27592f0541a5449debaf1ffa0fa1296fb8a74.zip
Check we aren't trying to convert PPC long double.
This fixes the testsuite failure on ppcf128-4.ll. llvm-svn: 49994
Diffstat (limited to 'llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp')
-rw-r--r--llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp9
1 files changed, 3 insertions, 6 deletions
diff --git a/llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp b/llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
index fa38c508486..90d64832d71 100644
--- a/llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
+++ b/llvm/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.
OpenPOWER on IntegriCloud