Fix up some mixed sign warnings.
--
PiperOrigin-RevId: 246614498
diff --git a/mlir/lib/Transforms/LoopFusion.cpp b/mlir/lib/Transforms/LoopFusion.cpp
index f8db53a..fda6574 100644
--- a/mlir/lib/Transforms/LoopFusion.cpp
+++ b/mlir/lib/Transforms/LoopFusion.cpp
@@ -1676,7 +1676,7 @@
<< " fused mem: " << fusedMem << "\n"
<< " slice mem: " << sliceMemEstimate << "\n");
- if (fusedMem > srcMemSizeVal + dstMemSizeVal) {
+ if (static_cast<long>(fusedMem) > srcMemSizeVal + dstMemSizeVal) {
LLVM_DEBUG(llvm::dbgs() << "Fusion is not profitable; NOT fusing.\n");
return false;
}
diff --git a/mlir/lib/Transforms/Utils/GreedyPatternRewriteDriver.cpp b/mlir/lib/Transforms/Utils/GreedyPatternRewriteDriver.cpp
index 8c6a932..3fd44c7 100644
--- a/mlir/lib/Transforms/Utils/GreedyPatternRewriteDriver.cpp
+++ b/mlir/lib/Transforms/Utils/GreedyPatternRewriteDriver.cpp
@@ -53,7 +53,7 @@
/// Perform the rewrites. Return true if the rewrite converges in
/// `maxIterations`.
- bool simplifyFunction(unsigned maxIterations);
+ bool simplifyFunction(int maxIterations);
void addToWorklist(Operation *op) {
// Check to see if the worklist already contains this op.
@@ -146,7 +146,7 @@
}; // end anonymous namespace
/// Perform the rewrites.
-bool GreedyPatternRewriteDriver::simplifyFunction(unsigned maxIterations) {
+bool GreedyPatternRewriteDriver::simplifyFunction(int maxIterations) {
Function *fn = builder.getFunction();
ConstantFoldHelper helper(fn);