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 | fc07a3473ab76e17725f3dde6cbf5df519b763b1 (patch) | |
tree | 0edb8c29784da6a6ed377ad4c9771b5d8880cdd6 /lib/Transforms/Scalar | |
parent | 766be1de9d94d3d30fad9218b478a9c83736165b (diff) | |
download | external_llvm-fc07a3473ab76e17725f3dde6cbf5df519b763b1.zip external_llvm-fc07a3473ab76e17725f3dde6cbf5df519b763b1.tar.gz external_llvm-fc07a3473ab76e17725f3dde6cbf5df519b763b1.tar.bz2 |
Fix bug in previous checkin
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9656 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Transforms/Scalar')
-rw-r--r-- | lib/Transforms/Scalar/InstructionCombining.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/Transforms/Scalar/InstructionCombining.cpp b/lib/Transforms/Scalar/InstructionCombining.cpp index d5da0b3..bbdfda3 100644 --- a/lib/Transforms/Scalar/InstructionCombining.cpp +++ b/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(); |