aboutsummaryrefslogtreecommitdiff
path: root/lib/VMCore/ConstantFold.cpp
diff options
context:
space:
mode:
authorReid Spencer <rspencer@reidspencer.com>2004-05-30 01:19:48 +0000
committerReid Spencer <rspencer@reidspencer.com>2004-05-30 01:19:48 +0000
commit3ee239bd40c1c54d79dd1aca0779b5e0da5e0c23 (patch)
tree7b0c1b59851f7b01d4d83bb6c36064c08cc61e78 /lib/VMCore/ConstantFold.cpp
parent542e85921689e9ad8283f3d775b1db52df99e583 (diff)
Fix a bug that Chris asserts emphatically is a bug. The changed clause
would always return false because the Type of a type value is always Type::TypeTY and can never be a floating point type. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13902 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/VMCore/ConstantFold.cpp')
-rw-r--r--lib/VMCore/ConstantFold.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/VMCore/ConstantFold.cpp b/lib/VMCore/ConstantFold.cpp
index 641ceaebc2..70984cd0a6 100644
--- a/lib/VMCore/ConstantFold.cpp
+++ b/lib/VMCore/ConstantFold.cpp
@@ -539,7 +539,7 @@ Constant *llvm::ConstantFoldCastInstruction(const Constant *V,
// Try to not produce a cast of a cast, which is almost always redundant.
if (!Op->getType()->isFloatingPoint() &&
!CE->getType()->isFloatingPoint() &&
- !DestTy->getType()->isFloatingPoint()) {
+ !DestTy->isFloatingPoint()) {
unsigned S1 = getSize(Op->getType()), S2 = getSize(CE->getType());
unsigned S3 = getSize(DestTy);
if (Op->getType() == DestTy && S3 >= S2)