aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/Transforms/Scalar/LoopStrengthReduce.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/Transforms/Scalar/LoopStrengthReduce.cpp b/lib/Transforms/Scalar/LoopStrengthReduce.cpp
index 9b792c1aca..892b1c5b3b 100644
--- a/lib/Transforms/Scalar/LoopStrengthReduce.cpp
+++ b/lib/Transforms/Scalar/LoopStrengthReduce.cpp
@@ -249,7 +249,7 @@ void LoopStrengthReduce::DeleteTriviallyDeadInstructions() {
for (unsigned i = 0, e = DeadInsts.size()-1; i < e; ++i) {
Instruction *I = DeadInsts[i];
if (!I->use_empty()) DeadInsts[i] = 0;
- while (DeadInsts[i+1] == I && i != e)
+ while (i != e && DeadInsts[i+1] == I)
DeadInsts[++i] = 0;
}