[MLIR] Fix AffineExpr getLargestKnownDivisor for ceildiv and floordiv
authorUday Bondhugula <uday@polymagelabs.com>
Mon, 11 Oct 2021 10:18:06 +0000 (15:48 +0530)
committerUday Bondhugula <uday@polymagelabs.com>
Tue, 26 Oct 2021 10:51:29 +0000 (16:21 +0530)
commit41a8b4600731b0ce702adb6087c73133089c78d5
tree9be9bdab8fbd418b6d5a4c251a9e16eed9ee863d
parentf279e50fd0f0035e0205f4d36e7e5a8e0112fc24
[MLIR] Fix AffineExpr getLargestKnownDivisor for ceildiv and floordiv

Fix AffineExpr `getLargestKnownDivisor` for ceil/floor div cases.
In these cases, nothing can be inferred on the divisor of the
result.

Add test case for `mod` as well.

Differential Revision: https://reviews.llvm.org/D112523
mlir/lib/IR/AffineExpr.cpp
mlir/test/Dialect/Affine/unroll.mlir