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 | 5927d8e94d0b50296c2af4acdfe4d799e369fc08 (patch) | |
tree | d5486f03f0621cdd69d550fe121476a97857dc47 /lib/VMCore/ConstantFold.cpp | |
parent | 8ac04ff5aca02ae1b6958803f2c17afb47007421 (diff) | |
download | external_llvm-5927d8e94d0b50296c2af4acdfe4d799e369fc08.zip external_llvm-5927d8e94d0b50296c2af4acdfe4d799e369fc08.tar.gz external_llvm-5927d8e94d0b50296c2af4acdfe4d799e369fc08.tar.bz2 |
Disable some compile-time optimizations on PPC
long double.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42958 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/VMCore/ConstantFold.cpp')
-rw-r--r-- | lib/VMCore/ConstantFold.cpp | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/lib/VMCore/ConstantFold.cpp b/lib/VMCore/ConstantFold.cpp index 8234900..485b428 100644 --- a/lib/VMCore/ConstantFold.cpp +++ b/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)) |