Fix bug: InstCombine/2003-09-09-VolatileLoadElim.ll

Loads "mayWriteToMemory" if they are volatile

llvm-svn: 8422
This commit is contained in:
Chris Lattner 2003-09-09 18:16:08 +00:00
parent 83da4f8bc6
commit 3eb4bba971
1 changed files with 2 additions and 0 deletions

View File

@ -159,6 +159,8 @@ public:
virtual Instruction *clone() const { return new LoadInst(*this); } virtual Instruction *clone() const { return new LoadInst(*this); }
virtual bool mayWriteToMemory() const { return isVolatile(); }
Value *getPointerOperand() { return getOperand(0); } Value *getPointerOperand() { return getOperand(0); }
const Value *getPointerOperand() const { return getOperand(0); } const Value *getPointerOperand() const { return getOperand(0); }
static unsigned getPointerOperandIndex() { return 0U; } static unsigned getPointerOperandIndex() { return 0U; }