Don't delete volatile loads. Doing so is not safe.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@40448 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Owen Anderson 2007-07-23 22:05:54 +00:00
parent fb80b6e056
commit 6b8894bb67

View File

@ -69,6 +69,12 @@ bool FDLE::runOnBasicBlock(BasicBlock &BB) {
for (BasicBlock::iterator BBI = BB.begin(), BBE = BB.end(); BBI != BBE; ++BBI) {
// If we find a store or a free...
if (LoadInst* L = dyn_cast<LoadInst>(BBI)) {
// We can't delete volatile loads
if (L->isVolatile()) {
lastLoad[L->getPointerOperand()] = L;
continue;
}
Value* pointer = L->getPointerOperand();
LoadInst*& last = lastLoad[pointer];