summaryrefslogtreecommitdiff
path: root/lib/VMCore/ConstantFold.cpp
diff options
context:
space:
mode:
authorReid Spencer <rspencer@reidspencer.com>2006-12-05 07:18:07 +0000
committerReid Spencer <rspencer@reidspencer.com>2006-12-05 07:18:07 +0000
commit6f40b831e0e653f88cbb17bf00d739bae28b5816 (patch)
tree829a0587e040dc60bccdd0986102f43c7f6f04ea /lib/VMCore/ConstantFold.cpp
parent35c1c04e8a4a0df5a52b29b374c6f1f9c772f292 (diff)
downloadllvm-6f40b831e0e653f88cbb17bf00d739bae28b5816.tar.gz
llvm-6f40b831e0e653f88cbb17bf00d739bae28b5816.tar.bz2
llvm-6f40b831e0e653f88cbb17bf00d739bae28b5816.tar.xz
Can't make these fail now with just BitCast. Previous failures must have
been in conjunction with something else. By right, they should just be BitCasts. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32219 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/VMCore/ConstantFold.cpp')
-rw-r--r--lib/VMCore/ConstantFold.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/VMCore/ConstantFold.cpp b/lib/VMCore/ConstantFold.cpp
index 58f1d444f6..4a274a71d4 100644
--- a/lib/VMCore/ConstantFold.cpp
+++ b/lib/VMCore/ConstantFold.cpp
@@ -777,7 +777,7 @@ static Constant *CastConstantPacked(ConstantPacked *CP,
uint64_t V =
DoubleToBits(cast<ConstantFP>(CP->getOperand(i))->getValue());
Constant *C = ConstantInt::get(Type::ULongTy, V);
- Result.push_back(ConstantExpr::getTruncOrBitCast(C, DstEltTy ));
+ Result.push_back(ConstantExpr::getBitCast(C, DstEltTy ));
}
return ConstantPacked::get(Result);
}
@@ -786,7 +786,7 @@ static Constant *CastConstantPacked(ConstantPacked *CP,
for (unsigned i = 0; i != SrcNumElts; ++i) {
uint32_t V = FloatToBits(cast<ConstantFP>(CP->getOperand(i))->getValue());
Constant *C = ConstantInt::get(Type::UIntTy, V);
- Result.push_back(ConstantExpr::getTruncOrBitCast(C, DstEltTy));
+ Result.push_back(ConstantExpr::getBitCast(C, DstEltTy));
}
return ConstantPacked::get(Result);
}