summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2002-01-22 03:30:06 +0000
committerChris Lattner <sabre@nondot.org>2002-01-22 03:30:06 +0000
commit70090079e73a866dcdb9a66ff595d15dfe2af76a (patch)
treef7c2fbc660aa3c66aff0538537ccfcda27dc612a /llvm/lib/Transforms
parentcad856b6ed08f75fce377b52076837deadc624ff (diff)
downloadbcm5719-llvm-70090079e73a866dcdb9a66ff595d15dfe2af76a.tar.gz
bcm5719-llvm-70090079e73a866dcdb9a66ff595d15dfe2af76a.zip
Don't insert a useless cast
llvm-svn: 1527
Diffstat (limited to 'llvm/lib/Transforms')
-rw-r--r--llvm/lib/Transforms/Scalar/LowerAllocations.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/llvm/lib/Transforms/Scalar/LowerAllocations.cpp b/llvm/lib/Transforms/Scalar/LowerAllocations.cpp
index 041d89fab17..0d26e2a2336 100644
--- a/llvm/lib/Transforms/Scalar/LowerAllocations.cpp
+++ b/llvm/lib/Transforms/Scalar/LowerAllocations.cpp
@@ -165,8 +165,7 @@ bool RaiseAllocations::runOnBasicBlock(BasicBlock *BB) {
MallocInst *MallocI = new MallocInst(PtrSByte, CI->getOperand(1),
CI->getName());
CI->setName("");
- BI = BIL.insert(BI, MallocI)+1;
- ReplaceInstWithInst(BIL, BI, new CastInst(MallocI, PtrSByte));
+ ReplaceInstWithInst(BIL, BI, MallocI);
Changed = true;
continue; // Skip the ++BI
} else if (CI->getCalledValue() == FreeMeth) { // Replace call to free?
OpenPOWER on IntegriCloud