diff options
author | Dan Gohman <gohman@apple.com> | 2009-06-30 01:24:43 +0000 |
---|---|---|
committer | Dan Gohman <gohman@apple.com> | 2009-06-30 01:24:43 +0000 |
commit | c0da8fc1d97f95a3aa7dd928483f54788ff9da1d (patch) | |
tree | 399c3e99b5dc065648164bdfe1366976ac357cb7 /lib/Transforms | |
parent | 412a6f28d5386195963f9c1ac944197307e82b65 (diff) | |
download | external_llvm-c0da8fc1d97f95a3aa7dd928483f54788ff9da1d.zip external_llvm-c0da8fc1d97f95a3aa7dd928483f54788ff9da1d.tar.gz external_llvm-c0da8fc1d97f95a3aa7dd928483f54788ff9da1d.tar.bz2 |
Minor code simplification.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74491 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Transforms')
-rw-r--r-- | lib/Transforms/Utils/LoopSimplify.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/lib/Transforms/Utils/LoopSimplify.cpp b/lib/Transforms/Utils/LoopSimplify.cpp index ee3f38a..d6b167f 100644 --- a/lib/Transforms/Utils/LoopSimplify.cpp +++ b/lib/Transforms/Utils/LoopSimplify.cpp @@ -282,10 +282,9 @@ ReprocessLoop: // Attempt to hoist out all instructions except for the // comparison and the branch. bool AllInvariant = true; - for (BasicBlock::iterator I = ExitingBlock->begin(), - E = ExitingBlock->end(); I != E; ) { + for (BasicBlock::iterator I = ExitingBlock->begin(); &*I != BI; ) { Instruction *Inst = I++; - if (Inst == BI || Inst == CI) + if (Inst == CI) continue; if (Inst->isTrapping()) { AllInvariant = false; |