mirror of
https://github.com/RPCS3/llvm.git
synced 2024-12-19 18:10:14 +00:00
Don't remove volatile loads. Thanks to Duncan for noticing this one.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54144 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
a5d5af985e
commit
80e051dfde
@ -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 ||
|
||||
|
Loading…
Reference in New Issue
Block a user