HomePhabricator

[MLIR] Fix memref get constant bound size and shape method

Authored by bondhugula on Jun 28 2021, 12:39 PM.

Description

[MLIR] Fix memref get constant bound size and shape method

Fix FlatAffineConstraints::getConstantBoundOnDimSize to ensure that
returned bounds on dim size are always non-negative regardless of the
constraints on that dimension. Add an assertion at the user.

Differential Revision: https://reviews.llvm.org/D105171