summaryrefslogtreecommitdiffstats
path: root/llvm/lib
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2003-11-02 06:54:48 +0000
committerChris Lattner <sabre@nondot.org>2003-11-02 06:54:48 +0000
commitd4d987dd4a0bb0302804876db40ef418a9b19f49 (patch)
tree5553c9e9b9f7c920e93d48320352a907673d5940 /llvm/lib
parent1f30e93306f9a23d123ac2b1a9dac7e8e669e85b (diff)
downloadbcm5719-llvm-d4d987dd4a0bb0302804876db40ef418a9b19f49.tar.gz
bcm5719-llvm-d4d987dd4a0bb0302804876db40ef418a9b19f49.zip
Fix bug in previous checkin
llvm-svn: 9656
Diffstat (limited to 'llvm/lib')
-rw-r--r--llvm/lib/Transforms/Scalar/InstructionCombining.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/Transforms/Scalar/InstructionCombining.cpp b/llvm/lib/Transforms/Scalar/InstructionCombining.cpp
index d5da0b3b54a..bbdfda3f76b 100644
--- a/llvm/lib/Transforms/Scalar/InstructionCombining.cpp
+++ b/llvm/lib/Transforms/Scalar/InstructionCombining.cpp
@@ -1543,7 +1543,7 @@ Instruction *InstCombiner::visitCastInst(CastInst &CI) {
// size, rewrite the allocation instruction to allocate the "right" type.
//
if (AllocationInst *AI = dyn_cast<AllocationInst>(Src))
- if (AI->hasOneUse())
+ if (AI->hasOneUse() && !AI->isArrayAllocation())
if (const PointerType *PTy = dyn_cast<PointerType>(CI.getType())) {
// Get the type really allocated and the type casted to...
const Type *AllocElTy = AI->getAllocatedType();
OpenPOWER on IntegriCloud