diff options
author | Chris Lattner <sabre@nondot.org> | 2003-09-09 18:16:08 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2003-09-09 18:16:08 +0000 |
commit | 76b5f88c57846b453d3b115930fe83089025ccca (patch) | |
tree | ea78c4adaab1910cbfd816e2fbb4c092d2e326ec /include | |
parent | ffd340c6b6f7e1db088e78b238edbcb5c2a00fdc (diff) | |
download | external_llvm-76b5f88c57846b453d3b115930fe83089025ccca.zip external_llvm-76b5f88c57846b453d3b115930fe83089025ccca.tar.gz external_llvm-76b5f88c57846b453d3b115930fe83089025ccca.tar.bz2 |
Fix bug: InstCombine/2003-09-09-VolatileLoadElim.ll
Loads "mayWriteToMemory" if they are volatile
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8422 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include')
-rw-r--r-- | include/llvm/iMemory.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/include/llvm/iMemory.h b/include/llvm/iMemory.h index 4cc76e4..d3dd9fd 100644 --- a/include/llvm/iMemory.h +++ b/include/llvm/iMemory.h @@ -159,6 +159,8 @@ public: virtual Instruction *clone() const { return new LoadInst(*this); } + virtual bool mayWriteToMemory() const { return isVolatile(); } + Value *getPointerOperand() { return getOperand(0); } const Value *getPointerOperand() const { return getOperand(0); } static unsigned getPointerOperandIndex() { return 0U; } |