Fix a thinko; isNotAlreadyContainedIn had a built-in negative, so the
authorDan Gohman <gohman@apple.com>
Mon, 14 Dec 2009 17:31:01 +0000 (17:31 +0000)
committerDan Gohman <gohman@apple.com>
Mon, 14 Dec 2009 17:31:01 +0000 (17:31 +0000)
condition was inverted when the code was converted to contains().

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91295 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Analysis/IVUsers.cpp
lib/Transforms/Scalar/LoopStrengthReduce.cpp

index 7898679c8eb8032f7798a190066e3c967b2bc3de..bf403238bb4a83515f5911e40c842d9ff822e1ee 100644 (file)
@@ -53,7 +53,7 @@ static bool containsAddRecFromDifferentLoop(const SCEV *S, Loop *L) {
       if (newLoop == L)
         return false;
       // if newLoop is an outer loop of L, this is OK.
-      if (!newLoop->contains(L->getHeader()))
+      if (newLoop->contains(L->getHeader()))
         return false;
     }
     return true;
index d79a713a07533ba89f4c62a0aca4626f286f107e..85cc71294ccb767568b46c771177749d2720321b 100644 (file)
@@ -250,7 +250,7 @@ static bool containsAddRecFromDifferentLoop(const SCEV *S, Loop *L) {
       if (newLoop == L)
         return false;
       // if newLoop is an outer loop of L, this is OK.
-      if (!newLoop->contains(L->getHeader()))
+      if (newLoop->contains(L->getHeader()))
         return false;
     }
     return true;