forked from OSchip/llvm-project
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. llvm-svn: 80017
This commit is contained in:
parent
1dfa9a9872
commit
2d0855605a
|
@ -4349,7 +4349,7 @@ static bool HasSameValue(const SCEV *A, const SCEV *B) {
|
|||
if (const SCEVUnknown *BU = dyn_cast<SCEVUnknown>(B))
|
||||
if (const Instruction *AI = dyn_cast<Instruction>(AU->getValue()))
|
||||
if (const Instruction *BI = dyn_cast<Instruction>(BU->getValue()))
|
||||
if (AI->isIdenticalTo(BI))
|
||||
if (AI->isIdenticalTo(BI) && !AI->mayReadFromMemory())
|
||||
return true;
|
||||
|
||||
// Otherwise assume they may have a different value.
|
||||
|
|
Loading…
Reference in New Issue