Don't remove volatile loads. Thanks to Duncan for noticing this one.

llvm-svn: 54144
This commit is contained in:
Owen Anderson 2008-07-28 20:52:42 +00:00
parent c5d24d64cf
commit 813bf7af7f
1 changed files with 1 additions and 1 deletions

View File

@ -183,7 +183,7 @@ bool DSE::runOnBasicBlock(BasicBlock &BB) {
Instruction* dep = MD.getDependency(S);
DominatorTree& DT = getAnalysis<DominatorTree>();
if (S->getParent() == L->getParent() &&
if (!S->isVolatile() && S->getParent() == L->getParent() &&
S->getPointerOperand() == L->getPointerOperand() &&
( dep == MemoryDependenceAnalysis::None ||
dep == MemoryDependenceAnalysis::NonLocal ||