[llvm] a90d721 - [llvm] Use instead of in IRSimilarityIdentifierTest.cpp.
Alexander Belyaev via llvm-commits
llvm-commits at lists.llvm.org
Thu Sep 24 02:29:00 PDT 2020
Author: Alexander Belyaev
Date: 2020-09-24T11:28:26+02:00
New Revision: a90d72127a814ea242227456be711aca07cc83a6
URL: https://github.com/llvm/llvm-project/commit/a90d72127a814ea242227456be711aca07cc83a6
DIFF: https://github.com/llvm/llvm-project/commit/a90d72127a814ea242227456be711aca07cc83a6.diff
LOG: [llvm] Use instead of in IRSimilarityIdentifierTest.cpp.
Added:
Modified:
llvm/unittests/Analysis/IRSimilarityIdentifierTest.cpp
Removed:
################################################################################
diff --git a/llvm/unittests/Analysis/IRSimilarityIdentifierTest.cpp b/llvm/unittests/Analysis/IRSimilarityIdentifierTest.cpp
index 4370f165782c..60459c200174 100644
--- a/llvm/unittests/Analysis/IRSimilarityIdentifierTest.cpp
+++ b/llvm/unittests/Analysis/IRSimilarityIdentifierTest.cpp
@@ -1685,7 +1685,7 @@ TEST(IRSimilarityIdentifier, InstructionDifference) {
std::vector<std::vector<IRSimilarityCandidate>> SimilarityCandidates;
getSimilarities(*M, SimilarityCandidates);
- ASSERT_TRUE(SimilarityCandidates.size() == 0);
+ ASSERT_TRUE(SimilarityCandidates.empty());
}
// This test checks to see whether we can detect similarity for commutativen
@@ -1708,7 +1708,7 @@ TEST(IRSimilarityIdentifier, CommutativeSimilarity) {
std::vector<std::vector<IRSimilarityCandidate>> SimilarityCandidates;
getSimilarities(*M, SimilarityCandidates);
- ASSERT_TRUE(SimilarityCandidates.size() == 0);
+ ASSERT_TRUE(SimilarityCandidates.empty());
}
// Check that we are not finding commutative similarity in non commutative
@@ -1733,7 +1733,7 @@ TEST(IRSimilarityIdentifier, NonCommutativeDifference) {
std::vector<std::vector<IRSimilarityCandidate>> SimilarityCandidates;
getSimilarities(*M, SimilarityCandidates);
- ASSERT_TRUE(SimilarityCandidates.size() == 0);
+ ASSERT_TRUE(SimilarityCandidates.empty());
}
// Check that we find similarity despite changing the register names.
@@ -1820,5 +1820,5 @@ TEST(IRSimilarityIdentifier, ConstantMappingDifference) {
std::vector<std::vector<IRSimilarityCandidate>> SimilarityCandidates;
getSimilarities(*M, SimilarityCandidates);
- ASSERT_TRUE(SimilarityCandidates.size() == 0);
+ ASSERT_TRUE(SimilarityCandidates.empty());
}
More information about the llvm-commits
mailing list