[Mlir-commits] [mlir] 117422c - [ComprehensiveBufferize] Fix a warning

Kazu Hirata llvmlistbot at llvm.org
Fri Jan 7 09:26:09 PST 2022


Author: Kazu Hirata
Date: 2022-01-07T09:25:59-08:00
New Revision: 117422c0dad1925ce5412f3bc952381bbc8748ec

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

LOG: [ComprehensiveBufferize] Fix a warning

This patch fixes:

  mlir/lib/Dialect/Linalg/ComprehensiveBufferize/LinalgInterfaceImpl.cpp:292:12:
  error: comparison of integers of different signs: 'int' and
  'unsigned int' [-Werror,-Wsign-compare]

Added: 
    

Modified: 
    mlir/lib/Dialect/Linalg/ComprehensiveBufferize/LinalgInterfaceImpl.cpp

Removed: 
    


################################################################################
diff  --git a/mlir/lib/Dialect/Linalg/ComprehensiveBufferize/LinalgInterfaceImpl.cpp b/mlir/lib/Dialect/Linalg/ComprehensiveBufferize/LinalgInterfaceImpl.cpp
index 0693dee0c4057..bf08155076b22 100644
--- a/mlir/lib/Dialect/Linalg/ComprehensiveBufferize/LinalgInterfaceImpl.cpp
+++ b/mlir/lib/Dialect/Linalg/ComprehensiveBufferize/LinalgInterfaceImpl.cpp
@@ -288,7 +288,7 @@ struct TiledLoopOpInterface
 
     // Compute new inputs, outputs and results.
     SmallVector<Value> newInputs, newOutputs, newResults;
-    for (int i = tiledLoopOp.getNumControlOperands();
+    for (unsigned i = tiledLoopOp.getNumControlOperands();
          i < tiledLoopOp->getNumOperands(); ++i) {
       OpOperand &operand = tiledLoopOp->getOpOperand(i);
       Value rewrittenValue = operand.get();


        


More information about the Mlir-commits mailing list