[Mlir-commits] [mlir] [mlir][QuasiPolynomial] Fixed unused variable error (PR #76417)

llvmlistbot at llvm.org llvmlistbot at llvm.org
Tue Dec 26 15:56:13 PST 2023


llvmbot wrote:


<!--LLVM PR SUMMARY COMMENT-->

@llvm/pr-subscribers-mlir-presburger

Author: Balaji V. Iyer. (bviyer)

<details>
<summary>Changes</summary>

One of the variable `aff` is used inside an assert. When the asserts are removed, the compiler complains of unused variable. This patch should fix this issue.

---
Full diff: https://github.com/llvm/llvm-project/pull/76417.diff


1 Files Affected:

- (modified) mlir/lib/Analysis/Presburger/QuasiPolynomial.cpp (+2-1) 


``````````diff
diff --git a/mlir/lib/Analysis/Presburger/QuasiPolynomial.cpp b/mlir/lib/Analysis/Presburger/QuasiPolynomial.cpp
index 902e3ced472f82..d26959b79953d0 100644
--- a/mlir/lib/Analysis/Presburger/QuasiPolynomial.cpp
+++ b/mlir/lib/Analysis/Presburger/QuasiPolynomial.cpp
@@ -30,6 +30,7 @@ QuasiPolynomial::QuasiPolynomial(
       assert(aff.size() == getNumInputs() + 1 &&
              "dimensionality of affine functions does not match number of "
              "symbols!");
+      (void) aff;
     }
   }
 }
@@ -110,4 +111,4 @@ QuasiPolynomial QuasiPolynomial::simplify() {
     newAffine.push_back(affine[i]);
   }
   return QuasiPolynomial(getNumInputs(), newCoeffs, newAffine);
-}
\ No newline at end of file
+}

``````````

</details>


https://github.com/llvm/llvm-project/pull/76417


More information about the Mlir-commits mailing list