Skip to content

Commit f2c9abc

Browse files
committed
[MLIR] Apply clang-tidy fixes for readability-container-size-empty in Vectorization.cpp (NFC)
1 parent ff130f2 commit f2c9abc

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

mlir/lib/Dialect/Linalg/Transforms/Vectorization.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -287,7 +287,7 @@ struct VectorizationState {
287287
/// moment we only make sure that there are no broadcast dimensions, but this
288288
/// might change if indexing maps evolve.
289289
bool isValidMaskingMap(AffineMap maskingMap) {
290-
return maskingMap.getBroadcastDims().size() == 0;
290+
return maskingMap.getBroadcastDims().empty();
291291
}
292292

293293
/// Turn the input indexing map into a valid masking map.
@@ -923,7 +923,7 @@ static uint64_t getTrailingNonUnitLoopDimIdx(LinalgOp linalgOp) {
923923
llvm::count_if(loopRanges, [](int64_t dim) { return dim != 1; }) == 1) &&
924924
"For statically shaped Linalg Ops, only one "
925925
"non-unit loop dim is expected");
926-
assert(loopRanges.size() != 0 && "Empty loops, nothing to analyse.");
926+
assert(!loopRanges.empty() && "Empty loops, nothing to analyse.");
927927

928928
size_t idx = loopRanges.size() - 1;
929929
for (; idx != 0; idx--)

0 commit comments

Comments
 (0)