Don't forget the TBAA info, if available.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@118842 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Dan Gohman 2010-11-11 21:27:26 +00:00
parent 4d70a29490
commit 888cbda188

View 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;
}