summaryrefslogtreecommitdiffstats
path: root/llvm/lib
diff options
context:
space:
mode:
authorNuno Lopes <nunoplopes@sapo.pt>2017-11-09 17:06:42 +0000
committerNuno Lopes <nunoplopes@sapo.pt>2017-11-09 17:06:42 +0000
commit9f82a2b60ed2e12cb41ebd3bb3c5a1ace02f9ed0 (patch)
tree603ebc1aad084934c8d00c1ef80aa183f8860f27 /llvm/lib
parent9a5e64f56acb8d788a08b8e1298a51b444ab5860 (diff)
downloadbcm5719-llvm-9f82a2b60ed2e12cb41ebd3bb3c5a1ace02f9ed0.tar.gz
bcm5719-llvm-9f82a2b60ed2e12cb41ebd3bb3c5a1ace02f9ed0.zip
[BasicAA] fix build break by converting the previously introduced assert into an if stmt
Apparently V1Size == -1 doest imply V2Size == -1, which is a bit surprising to me. llvm-svn: 317812
Diffstat (limited to 'llvm/lib')
-rw-r--r--llvm/lib/Analysis/BasicAliasAnalysis.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/Analysis/BasicAliasAnalysis.cpp b/llvm/lib/Analysis/BasicAliasAnalysis.cpp
index e68dd04a4c7..528806a4aab 100644
--- a/llvm/lib/Analysis/BasicAliasAnalysis.cpp
+++ b/llvm/lib/Analysis/BasicAliasAnalysis.cpp
@@ -1289,10 +1289,10 @@ AliasResult BasicAAResult::aliasGEP(const GEPOperator *GEP1, uint64_t V1Size,
// greater, we know they do not overlap.
if (GEP1BaseOffset != 0 && DecompGEP1.VarIndices.empty()) {
if (GEP1BaseOffset >= 0) {
- if (V2Size != MemoryLocation::UnknownSize) {
+ if (V1Size != MemoryLocation::UnknownSize &&
+ V2Size != MemoryLocation::UnknownSize) {
if ((uint64_t)GEP1BaseOffset < V2Size)
return PartialAlias;
- assert(V1Size != MemoryLocation::UnknownSize);
return NoAlias;
}
} else {
OpenPOWER on IntegriCloud