diff options
author | Dan Gohman <gohman@apple.com> | 2009-08-25 17:56:57 +0000 |
---|---|---|
committer | Dan Gohman <gohman@apple.com> | 2009-08-25 17:56:57 +0000 |
commit | 041de42d42f67ab6bb3d012805621e5b7adcc7d9 (patch) | |
tree | 75e58a77c5a43b90aca3525ffd342023710d41a1 /lib/Analysis/ScalarEvolution.cpp | |
parent | a123239a5fcdedf7254802dba44f0dfb4af5e907 (diff) |
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
Diffstat (limited to 'lib/Analysis/ScalarEvolution.cpp')
-rw-r--r-- | lib/Analysis/ScalarEvolution.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/Analysis/ScalarEvolution.cpp b/lib/Analysis/ScalarEvolution.cpp index 33d8a18412..d639aee709 100644 --- a/lib/Analysis/ScalarEvolution.cpp +++ b/lib/Analysis/ScalarEvolution.cpp @@ -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. |