diff --git a/llvm/lib/Transforms/Scalar/NewGVN.cpp b/llvm/lib/Transforms/Scalar/NewGVN.cpp index d8b0bd173454f..168f1d689d314 100644 --- a/llvm/lib/Transforms/Scalar/NewGVN.cpp +++ b/llvm/lib/Transforms/Scalar/NewGVN.cpp @@ -3056,13 +3056,8 @@ std::pair NewGVN::assignDFSNumbers(BasicBlock *B, void NewGVN::updateProcessedCount(const Value *V) { #ifndef NDEBUG - if (ProcessedCount.count(V) == 0) { - ProcessedCount.insert({V, 1}); - } else { - ++ProcessedCount[V]; - assert(ProcessedCount[V] < 100 && - "Seem to have processed the same Value a lot"); - } + assert(++ProcessedCount[V] < 100 && + "Seem to have processed the same Value a lot"); #endif }