Apparently V1Size == -1 doest imply V2Size == -1, which is a bit surprising to me.
llvm-svn: 317812
// 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 {