mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-02-21 21:29:41 +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.
|
// size, rewrite the allocation instruction to allocate the "right" type.
|
||||||
//
|
//
|
||||||
if (AllocationInst *AI = dyn_cast<AllocationInst>(Src))
|
if (AllocationInst *AI = dyn_cast<AllocationInst>(Src))
|
||||||
if (AI->hasOneUse())
|
if (AI->hasOneUse() && !AI->isArrayAllocation())
|
||||||
if (const PointerType *PTy = dyn_cast<PointerType>(CI.getType())) {
|
if (const PointerType *PTy = dyn_cast<PointerType>(CI.getType())) {
|
||||||
// Get the type really allocated and the type casted to...
|
// Get the type really allocated and the type casted to...
|
||||||
const Type *AllocElTy = AI->getAllocatedType();
|
const Type *AllocElTy = AI->getAllocatedType();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user