mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-24 03:33:20 +01:00
Fix a bug where we didn't realize that vaarg reads memory. This fixes
Transforms/DeadStoreElimination/2005-11-30-vaarg.ll llvm-svn: 24545
This commit is contained in:
parent
bf0175cf8f
commit
99e894a36f
@ -96,6 +96,13 @@ bool DSE::runOnBasicBlock(BasicBlock &BB) {
|
||||
}
|
||||
|
||||
if (!isa<StoreInst>(I) || cast<StoreInst>(I)->isVolatile()) {
|
||||
// If this is a vaarg instruction, it reads its operand. We don't model
|
||||
// it correctly, so just conservatively remove all entries.
|
||||
if (isa<VAArgInst>(I)) {
|
||||
KillLocs.clear();
|
||||
continue;
|
||||
}
|
||||
|
||||
// If this is a non-store instruction, it makes everything referenced no
|
||||
// longer killed. Remove anything aliased from the alias set tracker.
|
||||
KillLocs.remove(I);
|
||||
|
Loading…
Reference in New Issue
Block a user