[mlir] simplify affine maps and operands in affine.min/max
authorAlex Zinenko <zinenko@google.com>
Mon, 24 Feb 2020 16:43:01 +0000 (17:43 +0100)
committerAlex Zinenko <zinenko@google.com>
Tue, 25 Feb 2020 10:59:04 +0000 (11:59 +0100)
commit5f9b543e8e305630c9d133e4ac6366d836d75a59
treebe2eab4e724ef36a492ad385784fcffaf908a83f
parent3a1b34ff69be5d1cbd218bfe81fc66edb8fa15f1
[mlir] simplify affine maps and operands in affine.min/max

Affine dialect already has a map+operand simplification infrastructure in
place. Plug the recently added affine.min/max operations into this
infrastructure and add a simple test. More complex behavior of the simplifier
is already tested by other ops.

Addresses https://bugs.llvm.org/show_bug.cgi?id=45008.

Differential Revision: https://reviews.llvm.org/D75058
mlir/include/mlir/Dialect/AffineOps/AffineOps.td
mlir/lib/Dialect/AffineOps/AffineOps.cpp
mlir/test/AffineOps/canonicalize.mlir