diff options
author | Chris Lattner <sabre@nondot.org> | 2003-11-02 06:54:48 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2003-11-02 06:54:48 +0000 |
commit | d4d987dd4a0bb0302804876db40ef418a9b19f49 (patch) | |
tree | 5553c9e9b9f7c920e93d48320352a907673d5940 /llvm/lib | |
parent | 1f30e93306f9a23d123ac2b1a9dac7e8e669e85b (diff) | |
download | bcm5719-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.cpp | 2 |
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(); |