[ComprehensiveBufferize] Fix a warning
authorKazu Hirata <kazu@google.com>
Fri, 7 Jan 2022 17:25:59 +0000 (09:25 -0800)
committerKazu Hirata <kazu@google.com>
Fri, 7 Jan 2022 17:25:59 +0000 (09:25 -0800)
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]

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

index 0693dee..bf08155 100644 (file)
@@ -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();