This condition got inverted accidentally.
authorOwen Anderson <resistor@mac.com>
Wed, 30 Apr 2008 07:16:33 +0000 (07:16 +0000)
committerOwen Anderson <resistor@mac.com>
Wed, 30 Apr 2008 07:16:33 +0000 (07:16 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@50473 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Transforms/Scalar/LoopDeletion.cpp

index 4619ee78514a0b5757fca4dff4519a68159b03b5..763060c092ca4ef7645d0264d4f9a6e1e1fff216 100644 (file)
@@ -179,7 +179,7 @@ bool LoopDeletion::runOnLoop(Loop* L, LPPassManager& LPM) {
   
   // Don't remove loops for which we can't solve the trip count.
   // They could be infinite, in which case we'd be changing program behavior.
-  if (L->getTripCount())
+  if (!L->getTripCount())
     return false;
   
   // Loops with multiple exits or exits that don't dominate the latch