Revert r131781 again. Apparently there is more going on here.
authorDan Gohman <gohman@apple.com>
Sat, 4 Jun 2011 05:11:22 +0000 (05:11 +0000)
committerDan Gohman <gohman@apple.com>
Sat, 4 Jun 2011 05:11:22 +0000 (05:11 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@132625 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Analysis/BasicAliasAnalysis.cpp
test/Analysis/BasicAA/2010-09-15-GEP-SignedArithmetic.ll

index 3d10a5fd4d76fc6a0dcd776346049729d0e5b937..24297d4a0f3cf39c9465c04552c3df9c40ca9b6f 100644 (file)
@@ -944,17 +944,7 @@ BasicAliasAnalysis::aliasGEP(const GEPOperator *GEP1, uint64_t V1Size,
       return NoAlias;
   }
   
-  // Statically, we can see that the base objects are the same, but the
-  // pointers have dynamic offsets which we can't resolve. And none of our
-  // little tricks above worked.
-  //
-  // TODO: Returning PartialAlias instead of MayAlias is a mild hack; the
-  // practical effect of this is protecting TBAA in the case of dynamic
-  // indices into arrays of unions. An alternative way to solve this would
-  // be to have clang emit extra metadata for unions and/or union accesses.
-  // A union-specific solution wouldn't handle the problem for malloc'd
-  // memory however.
-  return PartialAlias;
+  return MayAlias;
 }
 
 static AliasAnalysis::AliasResult
index 7b5584e0bd8b1b9f09501e5df09e8495d1467338..2b0cd78fece30bf9eda81d213feac3baef498e77 100644 (file)
@@ -1,4 +1,4 @@
-; RUN: opt < %s -basicaa -aa-eval -print-all-alias-modref-info -disable-output |& grep {1 partial alias}
+; RUN: opt < %s -basicaa -aa-eval -print-all-alias-modref-info -disable-output |& grep {1 may alias}
 ; PR7959
 
 target datalayout = "e-p:32:32:32"