diff options
author | Chris Lattner <sabre@nondot.org> | 2008-11-29 20:29:04 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2008-11-29 20:29:04 +0000 |
commit | 3a76be584b6d5f85b2a5dadd21247063c0a24c30 (patch) | |
tree | ffd2aad9c9542661b4f32aa1944827998bddfd3e /lib/Transforms/Scalar/DeadStoreElimination.cpp | |
parent | 822293a40c24f41c05268f81e1ccdb0ebcbd34a9 (diff) | |
download | llvm-3a76be584b6d5f85b2a5dadd21247063c0a24c30.tar.gz llvm-3a76be584b6d5f85b2a5dadd21247063c0a24c30.tar.bz2 llvm-3a76be584b6d5f85b2a5dadd21247063c0a24c30.tar.xz |
Fix a thinko that manifested as a crash on clamav last night.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60251 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Transforms/Scalar/DeadStoreElimination.cpp')
-rw-r--r-- | lib/Transforms/Scalar/DeadStoreElimination.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/Transforms/Scalar/DeadStoreElimination.cpp b/lib/Transforms/Scalar/DeadStoreElimination.cpp index 1b6d850862..0acc995e87 100644 --- a/lib/Transforms/Scalar/DeadStoreElimination.cpp +++ b/lib/Transforms/Scalar/DeadStoreElimination.cpp @@ -130,7 +130,7 @@ bool DSE::runOnBasicBlock(BasicBlock &BB) { // If we deleted a store, reinvestigate this instruction. if (deletedStore) { - if (!isa<TerminatorInst>(BB.begin())) + if (BBI != BB.begin()) --BBI; continue; } @@ -157,7 +157,7 @@ bool DSE::runOnBasicBlock(BasicBlock &BB) { (!dep.isNormal() || DT.dominates(dep.getInst(), L))) { DeleteDeadInstruction(S); - if (!isa<TerminatorInst>(BB.begin())) + if (BBI != BB.begin()) --BBI; NumFastStores++; MadeChange = true; |