diff options
| author | Chris Lattner <sabre@nondot.org> | 2007-09-07 05:33:03 +0000 |
|---|---|---|
| committer | Chris Lattner <sabre@nondot.org> | 2007-09-07 05:33:03 +0000 |
| commit | 85a51e0060d1081571bd961eb5205cdaa2efbf5b (patch) | |
| tree | 99eb3fc0fef2d4d65d83f3e1a6b7cd87bcf8c0d5 /llvm/lib | |
| parent | e2f23a3abf7518a27a3e4e0342093190496d1b9f (diff) | |
| download | bcm5719-llvm-85a51e0060d1081571bd961eb5205cdaa2efbf5b.tar.gz bcm5719-llvm-85a51e0060d1081571bd961eb5205cdaa2efbf5b.zip | |
Don't zap back to back volatile load/stores
llvm-svn: 41759
Diffstat (limited to 'llvm/lib')
| -rw-r--r-- | llvm/lib/Transforms/Scalar/InstructionCombining.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/Transforms/Scalar/InstructionCombining.cpp b/llvm/lib/Transforms/Scalar/InstructionCombining.cpp index 26df55531a8..f9abafa34c0 100644 --- a/llvm/lib/Transforms/Scalar/InstructionCombining.cpp +++ b/llvm/lib/Transforms/Scalar/InstructionCombining.cpp @@ -9066,7 +9066,7 @@ Instruction *InstCombiner::visitStoreInst(StoreInst &SI) { // the pointer we're loading and is producing the pointer we're storing, // then *this* store is dead (X = load P; store X -> P). if (LoadInst *LI = dyn_cast<LoadInst>(BBI)) { - if (LI == Val && LI->getOperand(0) == Ptr) { + if (LI == Val && LI->getOperand(0) == Ptr && !SI.isVolatile()) { EraseInstFromFunction(SI); ++NumCombined; return 0; |

