summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Analysis/AliasSetTracker.cpp
diff options
context:
space:
mode:
authorXin Tong <trent.xin.tong@gmail.com>2017-06-25 12:55:11 +0000
committerXin Tong <trent.xin.tong@gmail.com>2017-06-25 12:55:11 +0000
commit70f7512add00ca11f76b49dbeec99874e69850c3 (patch)
tree1892467b1ba357622030e9c8fd0ce5d337d58dff /llvm/lib/Analysis/AliasSetTracker.cpp
parentf5035d6ee5ad11b9e5808b35bd8b45c5e4a548d3 (diff)
downloadbcm5719-llvm-70f7512add00ca11f76b49dbeec99874e69850c3.tar.gz
bcm5719-llvm-70f7512add00ca11f76b49dbeec99874e69850c3.zip
[AST] Fix a bug in aliasesUnknownInst. Make sure we are comparing the unknown instructions in the alias set and the instruction interested in.
Summary: Make sure we are comparing the unknown instructions in the alias set and the instruction interested in. I believe this is clearly a bug (missed opportunity). I can also add some test cases if desired. Reviewers: hfinkel, davide, dberlin Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D34597 llvm-svn: 306241
Diffstat (limited to 'llvm/lib/Analysis/AliasSetTracker.cpp')
-rw-r--r--llvm/lib/Analysis/AliasSetTracker.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/Analysis/AliasSetTracker.cpp b/llvm/lib/Analysis/AliasSetTracker.cpp
index ee17ad3ba58..4dfa25490d0 100644
--- a/llvm/lib/Analysis/AliasSetTracker.cpp
+++ b/llvm/lib/Analysis/AliasSetTracker.cpp
@@ -218,8 +218,8 @@ bool AliasSet::aliasesUnknownInst(const Instruction *Inst,
return false;
for (unsigned i = 0, e = UnknownInsts.size(); i != e; ++i) {
- if (auto *Inst = getUnknownInst(i)) {
- ImmutableCallSite C1(Inst), C2(Inst);
+ if (auto *UnknownInst = getUnknownInst(i)) {
+ ImmutableCallSite C1(UnknownInst), C2(Inst);
if (!C1 || !C2 || AA.getModRefInfo(C1, C2) != MRI_NoModRef ||
AA.getModRefInfo(C2, C1) != MRI_NoModRef)
return true;
OpenPOWER on IntegriCloud