aboutsummaryrefslogtreecommitdiff
path: root/lib/Transforms/Scalar/LoopDeletion.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Transforms/Scalar/LoopDeletion.cpp')
-rw-r--r--lib/Transforms/Scalar/LoopDeletion.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/Transforms/Scalar/LoopDeletion.cpp b/lib/Transforms/Scalar/LoopDeletion.cpp
index 3c0e8662a2..f68a5f7125 100644
--- a/lib/Transforms/Scalar/LoopDeletion.cpp
+++ b/lib/Transforms/Scalar/LoopDeletion.cpp
@@ -209,7 +209,7 @@ bool LoopDeletion::runOnLoop(Loop* L, LPPassManager& LPM) {
for (BasicBlock::iterator BI = (*LI)->begin(), BE = (*LI)->end();
BI != BE; ) {
Instruction* I = BI++;
- if (I->getNumUses() > 0 && IsLoopInvariantInst(I, L))
+ if (!I->use_empty() && IsLoopInvariantInst(I, L))
I->moveBefore(preheader->getTerminator());
}