Simplify contains tests using 'count'.
authorDavid Blaikie <dblaikie@gmail.com>
Sun, 5 Feb 2012 06:35:36 +0000 (06:35 +0000)
committerDavid Blaikie <dblaikie@gmail.com>
Sun, 5 Feb 2012 06:35:36 +0000 (06:35 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@149813 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Transforms/Vectorize/BBVectorize.cpp

index 6e21a8e31f303aaf011e59ee06397b1e7fd640b3..22cb6d5d11f47a779816d1bf5fdd097c6d3ac28b 100644 (file)
@@ -967,8 +967,7 @@ namespace {
           return true;
         }
 
-        if (CurrentPairs.count(C->second) != 0 &&
-            Visited.count(C->second) == 0)
+        if (CurrentPairs.count(C->second) && !Visited.count(C->second))
           Q.push_back(C->second);
       }
     } while (!Q.empty());