[llvm-commits] [llvm] r42958 - in /llvm/trunk/lib: CodeGen/SelectionDAG/SelectionDAG.cpp VMCore/ConstantFold.cpp
Dale Johannesen
dalej at apple.com
Sat Oct 13 18:56:47 PDT 2007
Author: johannes
Date: Sat Oct 13 20:56:47 2007
New Revision: 42958
URL: http://llvm.org/viewvc/llvm-project?rev=42958&view=rev
Log:
Disable some compile-time optimizations on PPC
long double.
Modified:
llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
llvm/trunk/lib/VMCore/ConstantFold.cpp
Modified: llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAG.cpp?rev=42958&r1=42957&r2=42958&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAG.cpp (original)
+++ llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAG.cpp Sat Oct 13 20:56:47 2007
@@ -965,6 +965,9 @@
}
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) {
Modified: llvm/trunk/lib/VMCore/ConstantFold.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/VMCore/ConstantFold.cpp?rev=42958&r1=42957&r2=42958&view=diff
==============================================================================
--- llvm/trunk/lib/VMCore/ConstantFold.cpp (original)
+++ llvm/trunk/lib/VMCore/ConstantFold.cpp Sat Oct 13 20:56:47 2007
@@ -149,6 +149,9 @@
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 @@
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 @@
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))
More information about the llvm-commits
mailing list