mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-03-19 19:31:50 +00:00
Fix PR491 and testcase Transforms/DeadStoreElimination/2004-12-28-PartialStore.ll
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19180 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
d0137cd0f4
commit
da16d8c00b
@ -111,7 +111,8 @@ bool DSE::runOnBasicBlock(BasicBlock &BB) {
|
||||
|
||||
if (AliasSet *AS = KillLocs.getAliasSetForPointerIfExists(Ptr, ValSize))
|
||||
for (AliasSet::iterator ASI = AS->begin(), E = AS->end(); ASI != E; ++ASI)
|
||||
if (AA.alias(ASI.getPointer(), ASI.getSize(), Ptr, ValSize)
|
||||
if (ASI.getSize() >= ValSize && // Overwriting all of this store.
|
||||
AA.alias(ASI.getPointer(), ASI.getSize(), Ptr, ValSize)
|
||||
== AliasAnalysis::MustAlias) {
|
||||
// If we found a must alias in the killed set, then this store really
|
||||
// is dead. Remember that the various operands of the store now have
|
||||
|
Loading…
x
Reference in New Issue
Block a user