diff options
| author | Dale Johannesen <dalej@apple.com> | 2007-10-14 01:56:47 +0000 |
|---|---|---|
| committer | Dale Johannesen <dalej@apple.com> | 2007-10-14 01:56:47 +0000 |
| commit | 19db093b350f2050a91bc7df7f548272453fd2ee (patch) | |
| tree | e93af757d7e1166fe2aaa3af5886de7a6d9c99b8 | |
| parent | 5811baf1a09f0312b046dc697b7e6cbd56a3634a (diff) | |
| download | bcm5719-llvm-19db093b350f2050a91bc7df7f548272453fd2ee.tar.gz bcm5719-llvm-19db093b350f2050a91bc7df7f548272453fd2ee.zip | |
Disable some compile-time optimizations on PPC
long double.
llvm-svn: 42958
| -rw-r--r-- | llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp | 3 | ||||
| -rw-r--r-- | llvm/lib/VMCore/ConstantFold.cpp | 12 |
2 files changed, 15 insertions, 0 deletions
diff --git a/llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp b/llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp index 3e798bc8ce7..eb6e60302d9 100644 --- a/llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp +++ b/llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp @@ -965,6 +965,9 @@ SDOperand SelectionDAG::FoldSetCC(MVT::ValueType VT, SDOperand N1, } if (ConstantFPSDNode *N1C = dyn_cast<ConstantFPSDNode>(N1.Val)) if (ConstantFPSDNode *N2C = dyn_cast<ConstantFPSDNode>(N2.Val)) { + // No compile time operations on this type yet. + if (N1C->getValueType(0) == MVT::ppcf128) + return SDOperand(); APFloat::cmpResult R = N1C->getValueAPF().compare(N2C->getValueAPF()); switch (Cond) { diff --git a/llvm/lib/VMCore/ConstantFold.cpp b/llvm/lib/VMCore/ConstantFold.cpp index 8234900032c..485b42863b2 100644 --- a/llvm/lib/VMCore/ConstantFold.cpp +++ b/llvm/lib/VMCore/ConstantFold.cpp @@ -149,6 +149,9 @@ Constant *llvm::ConstantFoldCastInstruction(unsigned opc, const Constant *V, return Constant::getNullValue(DestTy); return UndefValue::get(DestTy); } + // No compile-time operations on this type yet. + if (V->getType() == Type::PPC_FP128Ty || DestTy == Type::PPC_FP128Ty) + return 0; // If the cast operand is a constant expression, there's a few things we can // do to try to simplify it. @@ -808,6 +811,11 @@ static FCmpInst::Predicate evaluateFCmpRelation(const Constant *V1, const Constant *V2) { assert(V1->getType() == V2->getType() && "Cannot compare values of different types!"); + + // No compile-time operations on this type yet. + if (V1->getType() == Type::PPC_FP128Ty) + return FCmpInst::BAD_FCMP_PREDICATE; + // Handle degenerate case quickly if (V1 == V2) return FCmpInst::FCMP_OEQ; @@ -1095,6 +1103,10 @@ Constant *llvm::ConstantFoldCompareInstruction(unsigned short pred, if (isa<UndefValue>(C1) || isa<UndefValue>(C2)) return UndefValue::get(Type::Int1Ty); + // No compile-time operations on this type yet. + if (C1->getType() == Type::PPC_FP128Ty) + return 0; + // icmp eq/ne(null,GV) -> false/true if (C1->isNullValue()) { if (const GlobalValue *GV = dyn_cast<GlobalValue>(C2)) |

