mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-14 14:24:05 +00:00
Don't assume that two identical instructions that read from memory
will always return the same value. This isn't currently necessary, since this code doesn't currently ever get called under circumstances where it would matter, but it may some day. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80017 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -4349,7 +4349,7 @@ static bool HasSameValue(const SCEV *A, const SCEV *B) {
|
|||||||
if (const SCEVUnknown *BU = dyn_cast<SCEVUnknown>(B))
|
if (const SCEVUnknown *BU = dyn_cast<SCEVUnknown>(B))
|
||||||
if (const Instruction *AI = dyn_cast<Instruction>(AU->getValue()))
|
if (const Instruction *AI = dyn_cast<Instruction>(AU->getValue()))
|
||||||
if (const Instruction *BI = dyn_cast<Instruction>(BU->getValue()))
|
if (const Instruction *BI = dyn_cast<Instruction>(BU->getValue()))
|
||||||
if (AI->isIdenticalTo(BI))
|
if (AI->isIdenticalTo(BI) && !AI->mayReadFromMemory())
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
// Otherwise assume they may have a different value.
|
// Otherwise assume they may have a different value.
|
||||||
|
Reference in New Issue
Block a user