[Mlir-commits] [mlir] cdeaeee - [mlir] Apply ClangTidy readability fix (NFC)

Adrian Kuegel llvmlistbot at llvm.org
Tue Mar 28 00:48:13 PDT 2023


Author: Adrian Kuegel
Date: 2023-03-28T09:47:44+02:00
New Revision: cdeaeeeb6430c413201f425b66e8d0f64a18bc94

URL: https://github.com/llvm/llvm-project/commit/cdeaeeeb6430c413201f425b66e8d0f64a18bc94
DIFF: https://github.com/llvm/llvm-project/commit/cdeaeeeb6430c413201f425b66e8d0f64a18bc94.diff

LOG: [mlir] Apply ClangTidy readability fix (NFC)

Added: 
    

Modified: 
    mlir/lib/Dialect/Linalg/Transforms/ConvertConv2DToImg2Col.cpp

Removed: 
    


################################################################################
diff  --git a/mlir/lib/Dialect/Linalg/Transforms/ConvertConv2DToImg2Col.cpp b/mlir/lib/Dialect/Linalg/Transforms/ConvertConv2DToImg2Col.cpp
index 3341f8a91644c..2e320925a74ba 100644
--- a/mlir/lib/Dialect/Linalg/Transforms/ConvertConv2DToImg2Col.cpp
+++ b/mlir/lib/Dialect/Linalg/Transforms/ConvertConv2DToImg2Col.cpp
@@ -50,7 +50,7 @@ static Value createMul(Location loc, Value x, Value y, Type accType,
 // Delinearizes the given composite `index` by the basis specified in `factors`.
 static SmallVector<Value> unrollIndex(OpBuilder &b, Location loc, Value index,
                                       ArrayRef<int64_t> factors) {
-  assert(factors.size() >= 1 && "empty factor list");
+  assert(!factors.empty() && "empty factor list");
   SmallVector<Value> basis;
   for (int64_t f : factors)
     basis.push_back(b.create<arith::ConstantOp>(loc, b.getIndexAttr(f)));


        


More information about the Mlir-commits mailing list