aboutsummaryrefslogtreecommitdiff
path: root/unittests
diff options
context:
space:
mode:
authorAlina Sbirlea <asbirlea@google.com>2018-11-01 23:37:51 +0000
committerAlina Sbirlea <asbirlea@google.com>2018-11-01 23:37:51 +0000
commit782574b28c5fab38643e3b097fd78fe37d68cadc (patch)
treeb9187e821614365f3e7b9d2899f8de6025343d14 /unittests
parentbadd06e25e57f049fe9b33a12119d36ef168ccc7 (diff)
[AliasSetTracker] Misc cleanup (NFCI)
Summary: Remove two redundant checks, add one in the unit test. Remove an unused method. Fix computation of TotalMayAliasSetSize. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@345911 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'unittests')
-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 886971c4d3a..57d21e2fcb8 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);