mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-18 13:34:04 +00:00
Fix a case where GVN was failing to return true when it had, in fact, modified
the function. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@41077 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
6d6403c287
commit
8e8278e7fe
@ -856,10 +856,19 @@ bool GVN::processLoad(LoadInst* L,
|
||||
|
||||
// ... to a pointer that has been loaded from before...
|
||||
MemoryDependenceAnalysis& MD = getAnalysis<MemoryDependenceAnalysis>();
|
||||
bool removedNonLocal = false;
|
||||
Instruction* dep = MD.getDependency(L);
|
||||
if (dep == MemoryDependenceAnalysis::NonLocal &&
|
||||
L->getParent() != &L->getParent()->getParent()->getEntryBlock())
|
||||
processNonLocalLoad(L, toErase);
|
||||
L->getParent() != &L->getParent()->getParent()->getEntryBlock()) {
|
||||
removedNonLocal = processNonLocalLoad(L, toErase);
|
||||
|
||||
if (!removedNonLocal)
|
||||
last = L;
|
||||
|
||||
return removedNonLocal;
|
||||
}
|
||||
|
||||
|
||||
bool deletedLoad = false;
|
||||
|
||||
while (dep != MemoryDependenceAnalysis::None &&
|
||||
|
Loading…
x
Reference in New Issue
Block a user