Allow the inverse transform x86_fp80 -> i80 (also
fires during the Ada build).
llvm-svn: 63731
diff --git a/llvm/lib/VMCore/ConstantFold.cpp b/llvm/lib/VMCore/ConstantFold.cpp
index 5f7cbcd..ff4d897 100644
--- a/llvm/lib/VMCore/ConstantFold.cpp
+++ b/llvm/lib/VMCore/ConstantFold.cpp
@@ -161,17 +161,12 @@
// Otherwise, can't fold this (vector?)
return 0;
}
-
+
// Handle ConstantFP input.
- if (const ConstantFP *FP = dyn_cast<ConstantFP>(V)) {
+ if (const ConstantFP *FP = dyn_cast<ConstantFP>(V))
// FP -> Integral.
- if (DestTy == Type::Int32Ty) {
- return ConstantInt::get(FP->getValueAPF().bitcastToAPInt());
- } else {
- assert(DestTy == Type::Int64Ty && "only support f32/f64 for now!");
- return ConstantInt::get(FP->getValueAPF().bitcastToAPInt());
- }
- }
+ return ConstantInt::get(FP->getValueAPF().bitcastToAPInt());
+
return 0;
}