summaryrefslogtreecommitdiff
path: root/unittests/Analysis/AliasSetTrackerTest.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'unittests/Analysis/AliasSetTrackerTest.cpp')
-rw-r--r--unittests/Analysis/AliasSetTrackerTest.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/unittests/Analysis/AliasSetTrackerTest.cpp b/unittests/Analysis/AliasSetTrackerTest.cpp
index 886971c4d3a2..57d21e2fcb86 100644
--- a/unittests/Analysis/AliasSetTrackerTest.cpp
+++ b/unittests/Analysis/AliasSetTrackerTest.cpp
@@ -78,6 +78,8 @@ TEST(AliasSetTracker, AliasUnknownInst) {
for (auto &Inst : *Test->begin()) {
bool FoundAS = false;
for (AliasSet &AS : AST) {
+ if (!Inst.mayReadOrWriteMemory())
+ continue;
if (!AS.aliasesUnknownInst(&Inst, AA))
continue;
ASSERT_NE(FoundAS, true);