diff options
author | Nuno Lopes <nunoplopes@sapo.pt> | 2017-08-08 21:25:26 +0000 |
---|---|---|
committer | Nuno Lopes <nunoplopes@sapo.pt> | 2017-08-08 21:25:26 +0000 |
commit | 598d1632e1f7a60250669160cd4fd3d7886537de (patch) | |
tree | 57254e215a108c5aee6a796b45ede1637ea33c47 /llvm/lib/Analysis/BasicAliasAnalysis.cpp | |
parent | c3fc3bc5af0b52bab78008c432c63b5d4979fd60 (diff) | |
download | bcm5719-llvm-598d1632e1f7a60250669160cd4fd3d7886537de.tar.gz bcm5719-llvm-598d1632e1f7a60250669160cd4fd3d7886537de.zip |
BasicAA: assert on another case where aliasGEP shouldn't get a PartialAlias response
llvm-svn: 310420
Diffstat (limited to 'llvm/lib/Analysis/BasicAliasAnalysis.cpp')
-rw-r--r-- | llvm/lib/Analysis/BasicAliasAnalysis.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/llvm/lib/Analysis/BasicAliasAnalysis.cpp b/llvm/lib/Analysis/BasicAliasAnalysis.cpp index 9bd4349835e..180e5f4a644 100644 --- a/llvm/lib/Analysis/BasicAliasAnalysis.cpp +++ b/llvm/lib/Analysis/BasicAliasAnalysis.cpp @@ -1238,13 +1238,15 @@ AliasResult BasicAAResult::aliasGEP(const GEPOperator *GEP1, uint64_t V1Size, AliasResult R = aliasCheck(UnderlyingV1, MemoryLocation::UnknownSize, AAMDNodes(), V2, MemoryLocation::UnknownSize, V2AAInfo, nullptr, UnderlyingV2); - if (R != MustAlias) + if (R != MustAlias) { // If V2 may alias GEP base pointer, conservatively returns MayAlias. // If V2 is known not to alias GEP base pointer, then the two values // cannot alias per GEP semantics: "Any memory access must be done through // a pointer value associated with an address range of the memory access, // otherwise the behavior is undefined.". + assert(R == NoAlias || R == MayAlias); return R; + } // If the max search depth is reached the result is undefined if (GEP1MaxLookupReached) |