aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2007-04-11 03:27:24 +0000
committerChris Lattner <sabre@nondot.org>2007-04-11 03:27:24 +0000
commited4e51e58e021384cd6e7a281d13d25dbbee2eca (patch)
tree07b2b2b435a02cc614ba6fa9f9492c181c138e5c /lib
parentade7592085cbb3d37a7cc9701c4c07c9c58a87c5 (diff)
downloadexternal_llvm-ed4e51e58e021384cd6e7a281d13d25dbbee2eca.zip
external_llvm-ed4e51e58e021384cd6e7a281d13d25dbbee2eca.tar.gz
external_llvm-ed4e51e58e021384cd6e7a281d13d25dbbee2eca.tar.bz2
fix a regression introduced by my last patch.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35879 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib')
-rw-r--r--lib/Transforms/Scalar/ScalarReplAggregates.cpp15
1 files changed, 1 insertions, 14 deletions
diff --git a/lib/Transforms/Scalar/ScalarReplAggregates.cpp b/lib/Transforms/Scalar/ScalarReplAggregates.cpp
index 8bc9eff..ad34012 100644
--- a/lib/Transforms/Scalar/ScalarReplAggregates.cpp
+++ b/lib/Transforms/Scalar/ScalarReplAggregates.cpp
@@ -970,20 +970,7 @@ void SROA::ConvertUsesToScalar(Value *Ptr, AllocaInst *NewAI, unsigned Offset) {
if (isa<IntegerType>(LI->getType())) {
assert(NV->getType() == LI->getType() && "Truncate wasn't enough?");
} else if (LI->getType()->isFloatingPoint()) {
- // If needed, truncate the integer to the appropriate size.
- if (NTy->getBitWidth() > LIBitWidth) {
- switch (LI->getType()->getTypeID()) {
- default: assert(0 && "Unknown FP type!");
- case Type::FloatTyID:
- NV = new TruncInst(NV, Type::Int32Ty, LI->getName(), LI);
- break;
- case Type::DoubleTyID:
- NV = new TruncInst(NV, Type::Int64Ty, LI->getName(), LI);
- break;
- }
- }
-
- // Then do a bitcast.
+ // Just do a bitcast, we know the sizes match up.
NV = new BitCastInst(NV, LI->getType(), LI->getName(), LI);
} else {
// Otherwise must be a pointer.