diff options
author | Chris Lattner <sabre@nondot.org> | 2007-05-23 06:36:35 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2007-05-23 06:36:35 +0000 |
commit | f711fb7af89c4bda9edea6c0c07b78f12c3f193f (patch) | |
tree | 703a39cdf6d36b25cfc964f9507448f43538a3e1 /lib/Analysis/AliasSetTracker.cpp | |
parent | 74ee2b3b824ef5dc5db6ed8eab271a85e8e71fba (diff) |
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
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37305 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Analysis/AliasSetTracker.cpp')
-rw-r--r-- | lib/Analysis/AliasSetTracker.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/lib/Analysis/AliasSetTracker.cpp b/lib/Analysis/AliasSetTracker.cpp index 7f97620008..0397af7e97 100644 --- a/lib/Analysis/AliasSetTracker.cpp +++ b/lib/Analysis/AliasSetTracker.cpp @@ -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(); + } } } |