[mlir][affine] Fix crash in addAffineParallelOpDomain with min/max bounds (#184130)
`addAffineParallelOpDomain` checked `isConstant()` on the per-IV bound
maps of `affine.parallel`, then called `getSingleConstantResult()`.
However, `isConstant()` returns true for maps with *any* number of
constant results, while `getSingleConstantResult()` asserts exactly one.
When an `affine.parallel` has a multi-result bound (e.g., `to (min(128,
122))`), the per-IV upper bound map has two results `{128, 122}`, so
`isConstant()` is true but the subsequent `getSingleConstantResult()`
call aborts.
Fix by using `isSingleConstant()` (which requires exactly one result)
instead. Multi-result constant maps (min/max with all-constant
alternatives) are then handled by the general `addBound` path, which
correctly models the min/max semantics as multiple constraints.
Fixes #61734
Assisted-by: Claude Code
GitOrigin-RevId: b16f6da50b3b730abf8eb68ba68ba0cf71d29c34
See https://mlir.llvm.org/ for more information.