llvm-project
34ee7659 - [mlir][Presburger] Do not pivot an empty Simplex (#247345)

Commit
3 days ago
[mlir][Presburger] Do not pivot an empty Simplex (#247345) When an inequality makes the tableau empty, its row keeps a negative sample value. Simplex::addInequality still called restoreRow on later inequalities, and pivoting a tableau with a negative restricted row can make other restricted rows negative. Rolling back past the conflicting inequality then left a tableau marked non-empty whose sample violated its constraints. Subtraction adds constraints after the tableau becomes empty, causing a later redundancy check to fail with "Could not restore non-redundant row!". Skip restoreRow when adding inequalities to an already empty tableau. Partially addresses https://github.com/llvm/llvm-project/issues/122942 by fixing the Simplex::detectRedundant unreachable crash during set subtraction. Assisted-by: gemini-4-carbon
Parents
Loading