summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2008-11-29 20:29:04 +0000
committerChris Lattner <sabre@nondot.org>2008-11-29 20:29:04 +0000
commit8c5ff516c6c1f22937690f88e91afca22898ea17 (patch)
treeef9a8bf1a188d8259a10211544b583114da888a6 /llvm/lib/Transforms
parent35847809b74275a690468aedbea2752a8f8882d4 (diff)
downloadbcm5719-llvm-8c5ff516c6c1f22937690f88e91afca22898ea17.tar.gz
bcm5719-llvm-8c5ff516c6c1f22937690f88e91afca22898ea17.zip
Fix a thinko that manifested as a crash on clamav last night.
llvm-svn: 60251
Diffstat (limited to 'llvm/lib/Transforms')
-rw-r--r--llvm/lib/Transforms/Scalar/DeadStoreElimination.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/Transforms/Scalar/DeadStoreElimination.cpp b/llvm/lib/Transforms/Scalar/DeadStoreElimination.cpp
index 1b6d8508628..0acc995e872 100644
--- a/llvm/lib/Transforms/Scalar/DeadStoreElimination.cpp
+++ b/llvm/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;
OpenPOWER on IntegriCloud