[Mlir-commits] [mlir] [mlir] To fix a compile time warning. (PR #131151)
Daniel Chen
llvmlistbot at llvm.org
Thu Mar 13 08:01:21 PDT 2025
https://github.com/DanielCChen created https://github.com/llvm/llvm-project/pull/131151
Our build on AIX issues warning on unused varaible
```
llvm-project/mlir/lib/Dialect/Affine/Utils/LoopUtils.cpp:2065:14: warning: variable 'caf' set but not used [-Wunused-but-set-variable]
2065 | if (auto caf = lbs[d].isSingleConstant()) {
| ^
1 warning generated.
```
>From e86f2dc80abdce6dfd495089e6ffa759eda914ff Mon Sep 17 00:00:00 2001
From: Daniel Chen <cdchen at ca.ibm.com>
Date: Thu, 13 Mar 2025 10:58:19 -0400
Subject: [PATCH] [mlir] To fix a compile time warning.
---
mlir/lib/Dialect/Affine/Utils/LoopUtils.cpp | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/mlir/lib/Dialect/Affine/Utils/LoopUtils.cpp b/mlir/lib/Dialect/Affine/Utils/LoopUtils.cpp
index b58bf3f271d47..71c6acba32d2e 100644
--- a/mlir/lib/Dialect/Affine/Utils/LoopUtils.cpp
+++ b/mlir/lib/Dialect/Affine/Utils/LoopUtils.cpp
@@ -2062,7 +2062,7 @@ static LogicalResult generateCopy(
// Set copy start location for this dimension in the lower memory space
// memref.
- if (auto caf = lbs[d].isSingleConstant()) {
+ if (lbs[d].isSingleConstant()) {
auto indexVal = lbs[d].getSingleConstantResult();
if (indexVal == 0) {
memIndices.push_back(zeroIndex);
More information about the Mlir-commits
mailing list