Fix PR2346 by marking vaarg as volatile so that licm doesn't try to

hoist them.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51356 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Chris Lattner
2008-05-20 22:05:28 +00:00
parent 7a9708b984
commit eb0fdc150a
2 changed files with 34 additions and 1 deletions

View File

@ -294,7 +294,10 @@ bool AliasSetTracker::add(FreeInst *FI) {
bool AliasSetTracker::add(VAArgInst *VAAI) {
bool NewPtr;
addPointer(VAAI->getOperand(0), ~0, AliasSet::ModRef, NewPtr);
AliasSet &AS = addPointer(VAAI->getOperand(0), ~0, AliasSet::ModRef, NewPtr);
// Treat vaarg instructions as volatile (not to be moved).
AS.setVolatile();
return NewPtr;
}