mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-07-28 19:25:00 +00:00
Fix a miscompilation in spiff on PPC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@44437 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -1054,7 +1054,8 @@ bool GVN::processInstruction(Instruction* I,
|
|||||||
if (CI->getCalledFunction() &&
|
if (CI->getCalledFunction() &&
|
||||||
!AA.doesNotAccessMemory(CI->getCalledFunction())) {
|
!AA.doesNotAccessMemory(CI->getCalledFunction())) {
|
||||||
MemoryDependenceAnalysis& MD = getAnalysis<MemoryDependenceAnalysis>();
|
MemoryDependenceAnalysis& MD = getAnalysis<MemoryDependenceAnalysis>();
|
||||||
if (MD.getDependency(CI) != MD.getDependency(cast<CallInst>(repl))) {
|
if (cast<Instruction>(repl)->getParent() != CI->getParent() ||
|
||||||
|
MD.getDependency(CI) != MD.getDependency(cast<CallInst>(repl))) {
|
||||||
// There must be an intervening may-alias store, so nothing from
|
// There must be an intervening may-alias store, so nothing from
|
||||||
// this point on will be able to be replaced with the preceding call
|
// this point on will be able to be replaced with the preceding call
|
||||||
currAvail.erase(repl);
|
currAvail.erase(repl);
|
||||||
|
Reference in New Issue
Block a user