[llvm] r310373 - BasicAA: aliasGEP shouldn't get a PartialAlias response here
Nuno Lopes via llvm-commits
llvm-commits at lists.llvm.org
Tue Aug 8 09:13:24 PDT 2017
Author: nlopes
Date: Tue Aug 8 09:13:24 2017
New Revision: 310373
URL: http://llvm.org/viewvc/llvm-project?rev=310373&view=rev
Log:
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)
Modified:
llvm/trunk/lib/Analysis/BasicAliasAnalysis.cpp
Modified: llvm/trunk/lib/Analysis/BasicAliasAnalysis.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Analysis/BasicAliasAnalysis.cpp?rev=310373&r1=310372&r2=310373&view=diff
==============================================================================
--- llvm/trunk/lib/Analysis/BasicAliasAnalysis.cpp (original)
+++ llvm/trunk/lib/Analysis/BasicAliasAnalysis.cpp Tue Aug 8 09:13:24 2017
@@ -1196,8 +1196,10 @@ AliasResult BasicAAResult::aliasGEP(cons
// 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
More information about the llvm-commits
mailing list