[llvm-commits] CVS: llvm/lib/Transforms/Scalar/ScalarReplAggregates.cpp
Chris Lattner
sabre at nondot.org
Tue Apr 10 20:27:41 PDT 2007
Changes in directory llvm/lib/Transforms/Scalar:
ScalarReplAggregates.cpp updated: 1.82 -> 1.83
---
Log message:
fix a regression introduced by my last patch.
---
Diffs of the changes: (+1 -14)
ScalarReplAggregates.cpp | 15 +--------------
1 files changed, 1 insertion(+), 14 deletions(-)
Index: llvm/lib/Transforms/Scalar/ScalarReplAggregates.cpp
diff -u llvm/lib/Transforms/Scalar/ScalarReplAggregates.cpp:1.82 llvm/lib/Transforms/Scalar/ScalarReplAggregates.cpp:1.83
--- llvm/lib/Transforms/Scalar/ScalarReplAggregates.cpp:1.82 Tue Apr 10 19:57:54 2007
+++ llvm/lib/Transforms/Scalar/ScalarReplAggregates.cpp Tue Apr 10 22:27:24 2007
@@ -970,20 +970,7 @@
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.
More information about the llvm-commits
mailing list