Fix delegation

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@227098 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Daniel Berlin 2015-01-26 17:30:39 +00:00
parent dbc6dda771
commit 0d16cafbe3

View File

@ -227,10 +227,13 @@ public:
// Comparisons between global variables and other constants should be // Comparisons between global variables and other constants should be
// handled by BasicAA. // handled by BasicAA.
if (isa<Constant>(LocA.Ptr) && isa<Constant>(LocB.Ptr)) { if (isa<Constant>(LocA.Ptr) && isa<Constant>(LocB.Ptr)) {
return MayAlias; return AliasAnalysis::alias(LocA, LocB);
} }
AliasResult QueryResult = query(LocA, LocB);
if (QueryResult == MayAlias)
return AliasAnalysis::alias(LocA, LocB);
return query(LocA, LocB); return QueryResult;
} }
void initializePass() override { InitializeAliasAnalysis(this); } void initializePass() override { InitializeAliasAnalysis(this); }