1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-21 03:53:04 +02:00

Fix bug in previous checkin

llvm-svn: 9656
This commit is contained in:
Chris Lattner 2003-11-02 06:54:48 +00:00
parent 931d295504
commit e005f61e9e

View File

@ -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();