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:
parent
931d295504
commit
e005f61e9e
@ -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();
|
||||
|
Loading…
Reference in New Issue
Block a user