summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--llvm/lib/VMCore/Instruction.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/llvm/lib/VMCore/Instruction.cpp b/llvm/lib/VMCore/Instruction.cpp
index a446cc20a93..2316b486898 100644
--- a/llvm/lib/VMCore/Instruction.cpp
+++ b/llvm/lib/VMCore/Instruction.cpp
@@ -226,13 +226,14 @@ bool Instruction::mayReadFromMemory() const {
default: return false;
case Instruction::Free:
case Instruction::VAArg:
+ case Instruction::Load:
return true;
case Instruction::Call:
return !cast<CallInst>(this)->doesNotAccessMemory();
case Instruction::Invoke:
return !cast<InvokeInst>(this)->doesNotAccessMemory();
- case Instruction::Load:
- return true;
+ case Instruction::Store:
+ return cast<StoreInst>(this)->isVolatile();
}
}
OpenPOWER on IntegriCloud