[PATCH] D34597: [AliasSet] Fix a bug in aliasesUnknownInst. Make sure we are comparing the unknown instructions in the alias set and the instruction interested in.
Xin Tong via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sat Jun 24 11:34:38 PDT 2017
trentxintong created this revision.
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.
https://reviews.llvm.org/D34597
Files:
lib/Analysis/AliasSetTracker.cpp
Index: lib/Analysis/AliasSetTracker.cpp
===================================================================
--- lib/Analysis/AliasSetTracker.cpp
+++ lib/Analysis/AliasSetTracker.cpp
@@ -218,8 +218,8 @@
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;
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D34597.103846.patch
Type: text/x-patch
Size: 621 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170624/54b805d7/attachment.bin>
More information about the llvm-commits
mailing list