[Mlir-commits] [mlir] 0f92533 - [MLIR] Simplex::normalizeRow: assert gcd is non-zero before dividing
Arjun P
llvmlistbot at llvm.org
Thu Jan 6 05:41:01 PST 2022
Author: Arjun P
Date: 2022-01-06T19:10:47+05:30
New Revision: 0f925339e52e361946a1e894cfa6dbe494b39290
URL: https://github.com/llvm/llvm-project/commit/0f925339e52e361946a1e894cfa6dbe494b39290
DIFF: https://github.com/llvm/llvm-project/commit/0f925339e52e361946a1e894cfa6dbe494b39290.diff
LOG: [MLIR] Simplex::normalizeRow: assert gcd is non-zero before dividing
Added:
Modified:
mlir/lib/Analysis/Presburger/Simplex.cpp
Removed:
################################################################################
diff --git a/mlir/lib/Analysis/Presburger/Simplex.cpp b/mlir/lib/Analysis/Presburger/Simplex.cpp
index 3d63ebdb0ca26..ad1e019ded3da 100644
--- a/mlir/lib/Analysis/Presburger/Simplex.cpp
+++ b/mlir/lib/Analysis/Presburger/Simplex.cpp
@@ -132,6 +132,7 @@ void SimplexBase::normalizeRow(unsigned row) {
// Note that the gcd can never become zero since the first element of the row,
// the denominator, is non-zero.
+ assert(gcd != 0);
for (unsigned col = 0; col < nCol; ++col)
tableau(row, col) /= gcd;
}
More information about the Mlir-commits
mailing list