summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Analysis/ScalarEvolution.cpp
diff options
context:
space:
mode:
authorDan Gohman <gohman@apple.com>2009-08-25 17:56:57 +0000
committerDan Gohman <gohman@apple.com>2009-08-25 17:56:57 +0000
commit2d0855605a380b7e281e6ac652fb3963322e10e6 (patch)
treedbb3784ba59f6d836b253f09dde6b68e1213c5d1 /llvm/lib/Analysis/ScalarEvolution.cpp
parent1dfa9a9872a713d59f8cf702f0ab7295a8fecb50 (diff)
downloadbcm5719-llvm-2d0855605a380b7e281e6ac652fb3963322e10e6.tar.gz
bcm5719-llvm-2d0855605a380b7e281e6ac652fb3963322e10e6.zip
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
Diffstat (limited to 'llvm/lib/Analysis/ScalarEvolution.cpp')
-rw-r--r--llvm/lib/Analysis/ScalarEvolution.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/Analysis/ScalarEvolution.cpp b/llvm/lib/Analysis/ScalarEvolution.cpp
index 33d8a18412d..d639aee7099 100644
--- a/llvm/lib/Analysis/ScalarEvolution.cpp
+++ b/llvm/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.
OpenPOWER on IntegriCloud