mirror of
https://github.com/RPCSX/llvm.git
synced 2024-11-28 06:00:28 +00:00
Fixed bug in DeadStoreElimination commit r144239
Size of data being pointed to wasn't always being checked so some small writes were killing big writes Fixes <rdar://problem/10426753> git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@144312 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
c343e3192b
commit
c7e5a6a2c6
@ -380,7 +380,7 @@ static OverwriteResult isOverwrite(const AliasAnalysis::Location &Later,
|
||||
if (isObjectPointerWithTrustworthySize(UO2)) {
|
||||
uint64_t ObjectSize =
|
||||
TD.getTypeAllocSize(cast<PointerType>(UO2->getType())->getElementType());
|
||||
if (ObjectSize == Later.Size)
|
||||
if (ObjectSize == Later.Size && ObjectSize >= Earlier.Size)
|
||||
return OverwriteComplete;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user