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 | 4dfc68005905aea57c3b875be23014f6fc87b3a9 (patch) | |
tree | 0590acb890df94443b298eeac9790289513b661d /llvm/lib/Transforms/Utils/LoopSimplify.cpp | |
parent | 17512663f56eb5321187af149193f7e7b6a74cc2 (diff) | |
download | llvm-4dfc68005905aea57c3b875be23014f6fc87b3a9.zip llvm-4dfc68005905aea57c3b875be23014f6fc87b3a9.tar.gz llvm-4dfc68005905aea57c3b875be23014f6fc87b3a9.tar.bz2 |
Minor code simplification.
llvm-svn: 74491
Diffstat (limited to 'llvm/lib/Transforms/Utils/LoopSimplify.cpp')
-rw-r--r-- | llvm/lib/Transforms/Utils/LoopSimplify.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/llvm/lib/Transforms/Utils/LoopSimplify.cpp b/llvm/lib/Transforms/Utils/LoopSimplify.cpp index ee3f38a..d6b167f 100644 --- a/llvm/lib/Transforms/Utils/LoopSimplify.cpp +++ b/llvm/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; |