Skip to content

Commit 0f92533

Browse files
committed
[MLIR] Simplex::normalizeRow: assert gcd is non-zero before dividing
1 parent 41a5227 commit 0f92533

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

mlir/lib/Analysis/Presburger/Simplex.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -132,6 +132,7 @@ void SimplexBase::normalizeRow(unsigned row) {
132132

133133
// Note that the gcd can never become zero since the first element of the row,
134134
// the denominator, is non-zero.
135+
assert(gcd != 0);
135136
for (unsigned col = 0; col < nCol; ++col)
136137
tableau(row, col) /= gcd;
137138
}

0 commit comments

Comments
 (0)