File tree Expand file tree Collapse file tree 2 files changed +11
-7
lines changed
mlir/lib/Analysis/Presburger Expand file tree Collapse file tree 2 files changed +11
-7
lines changed Original file line number Diff line number Diff line change @@ -178,13 +178,13 @@ mlir::presburger::detail::solveParametricEquations(FracMatrix equations) {
178178 for (unsigned i = 0 ; i < d; ++i) {
179179 // First ensure that the diagonal element is nonzero, by swapping
180180 // it with a row that is non-zero at column i.
181- if (equations (i, i) != 0 )
182- continue ;
183- for ( unsigned j = i + 1 ; j < d; ++j) {
184- if ( equations (j, i) == 0 )
185- continue ;
186- equations. swapRows (j, i) ;
187- break ;
181+ if (equations (i, i) == 0 ) {
182+ for ( unsigned j = i + 1 ; j < d; ++j) {
183+ if ( equations (j, i) == 0 )
184+ continue ;
185+ equations. swapRows (j, i) ;
186+ break ;
187+ }
188188 }
189189
190190 Fraction diagElement = equations (i, i);
Original file line number Diff line number Diff line change @@ -1142,6 +1142,10 @@ bool IntegerRelation::gaussianEliminate() {
11421142 inequalities.normalizeRow (i);
11431143 }
11441144 gcdTightenInequalities ();
1145+
1146+ // The column is finished. Tell the next iteration to start at the next
1147+ // column.
1148+ firstVar++;
11451149 }
11461150
11471151 // No redundant rows.
You can’t perform that action at this time.
0 commit comments