mirror of
https://github.com/RPCSX/llvm.git
synced 2024-12-04 01:43:06 +00:00
Fix bug in previous checkin
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9656 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
766be1de9d
commit
fc07a3473a
@ -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