when merging two alias sets together, be sure to propagate the volatility of

the inner set.  This fixes PR1435 and Transforms/LICM/2007-05-22-VolatileSink.ll

llvm-svn: 37305
This commit is contained in:
Chris Lattner 2007-05-23 06:36:35 +00:00
parent e44b6a6aaf
commit 688b2807df
1 changed files with 5 additions and 3 deletions

View File

@ -351,9 +351,11 @@ void AliasSetTracker::add(const AliasSetTracker &AST) {
// Loop over all of the pointers in this alias set...
AliasSet::iterator I = AS.begin(), E = AS.end();
bool X;
for (; I != E; ++I)
addPointer(I.getPointer(), I.getSize(),
(AliasSet::AccessType)AS.AccessTy, X);
for (; I != E; ++I) {
AliasSet &NewAS = addPointer(I.getPointer(), I.getSize(),
(AliasSet::AccessType)AS.AccessTy, X);
if (AS.isVolatile()) NewAS.setVolatile();
}
}
}