When determining if we can fold (x >> C1) << C2, the bits that we need to verify...
[oota-llvm.git] / lib / Analysis / AliasSetTracker.cpp
index e74fbec5e1fe0251fbc6ca0d0567fb657da666ca..3a46976d66f7ac0f0f027aea4d4fcc108c81fba7 100644 (file)
@@ -46,7 +46,12 @@ void AliasSet::mergeSetIn(AliasSet &AS, AliasSetTracker &AST) {
     PointerRec *R = AS.getSomePointer();
 
     // If the pointers are not a must-alias pair, this set becomes a may alias.
-    if (AA.alias(L->getValue(), L->getSize(), R->getValue(), R->getSize())
+    if (AA.alias(AliasAnalysis::Location(L->getValue(),
+                                         L->getSize(),
+                                         L->getTBAAInfo()),
+                 AliasAnalysis::Location(R->getValue(),
+                                         R->getSize(),
+                                         R->getTBAAInfo()))
         != AliasAnalysis::MustAlias)
       AliasTy = MayAlias;
   }
@@ -100,7 +105,7 @@ void AliasSet::addPointer(AliasSetTracker &AST, PointerRec &Entry,
         AA.alias(AliasAnalysis::Location(P->getValue(), P->getSize(),
                                          P->getTBAAInfo()),
                  AliasAnalysis::Location(Entry.getValue(), Size, TBAAInfo));
-      if (Result == AliasAnalysis::MayAlias)
+      if (Result != AliasAnalysis::MustAlias)
         AliasTy = MayAlias;
       else                  // First entry of must alias must have maximum size!
         P->updateSizeAndTBAAInfo(Size, TBAAInfo);