From db16a7c44a9c4903fba3601f04c6886a1ba1c2b4 Mon Sep 17 00:00:00 2001 From: Nuno Lopes Date: Tue, 8 Aug 2017 16:13:24 +0000 Subject: [PATCH] BasicAA: aliasGEP shouldn't get a PartialAlias response here add an assert() to ensure that's the case (as I'm not convinced it won't happen) git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@310373 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Analysis/BasicAliasAnalysis.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/Analysis/BasicAliasAnalysis.cpp b/lib/Analysis/BasicAliasAnalysis.cpp index e682a644ef2..9bd4349835e 100644 --- a/lib/Analysis/BasicAliasAnalysis.cpp +++ b/lib/Analysis/BasicAliasAnalysis.cpp @@ -1196,8 +1196,10 @@ AliasResult BasicAAResult::aliasGEP(const GEPOperator *GEP1, uint64_t V1Size, // If we get a No or May, then return it immediately, no amount of analysis // will improve this situation. - if (BaseAlias != MustAlias) + if (BaseAlias != MustAlias) { + assert(BaseAlias == NoAlias || BaseAlias == MayAlias); return BaseAlias; + } // Otherwise, we have a MustAlias. Since the base pointers alias each other // exactly, see if the computed offset from the common pointer tells us -- 2.50.1