OSDN Git Service

revert r317812 [BasicAA] fix build break by converting the previously introduced...
authorNuno Lopes <nunoplopes@sapo.pt>
Thu, 9 Nov 2017 17:35:36 +0000 (17:35 +0000)
committerNuno Lopes <nunoplopes@sapo.pt>
Thu, 9 Nov 2017 17:35:36 +0000 (17:35 +0000)
The code has a bug, but some tests regress.
I'll discuss this further on the mailing list.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@317815 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Analysis/BasicAliasAnalysis.cpp

index 528806a..fb9ece2 100644 (file)
@@ -1289,8 +1289,7 @@ 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 (V1Size != MemoryLocation::UnknownSize &&
-          V2Size != MemoryLocation::UnknownSize) {
+      if (V2Size != MemoryLocation::UnknownSize) {
         if ((uint64_t)GEP1BaseOffset < V2Size)
           return PartialAlias;
         return NoAlias;