[llvm] r317812 - [BasicAA] fix build break by converting the previously introduced assert into an if stmt
Nuno Lopes via llvm-commits
llvm-commits at lists.llvm.org
Thu Nov 9 09:06:43 PST 2017
Author: nlopes
Date: Thu Nov 9 09:06:42 2017
New Revision: 317812
URL: http://llvm.org/viewvc/llvm-project?rev=317812&view=rev
Log:
[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.
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=317812&r1=317811&r2=317812&view=diff
==============================================================================
--- llvm/trunk/lib/Analysis/BasicAliasAnalysis.cpp (original)
+++ llvm/trunk/lib/Analysis/BasicAliasAnalysis.cpp Thu Nov 9 09:06:42 2017
@@ -1289,10 +1289,10 @@ AliasResult BasicAAResult::aliasGEP(cons
// 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 {
More information about the llvm-commits
mailing list