[Affine-fusion] Fix a bug in mod detection
authorVinayaka Bandishti <vinayaka@polymagelabs.com>
Mon, 5 Jun 2023 05:17:42 +0000 (10:47 +0530)
committerUday Bondhugula <uday@polymagelabs.com>
Mon, 5 Jun 2023 05:17:48 +0000 (10:47 +0530)
commitc45c96250b422fc59cd3b3454fddf737512cf838
treef24d04d7717fa00451be4fa0495ae4f1ea733dc0
parent01c755ff80cbb795f507cf4317b4a4be1a31484d
[Affine-fusion] Fix a bug in mod detection

Fix a bug in detecting unknown ids as mods of known ids that was
preventing certain fusions.

While at this, fix the function signature of `detectAsMod` function to
have output as the last argument.

Reviewed By: bondhugula

Differential Revision: https://reviews.llvm.org/D152055
mlir/lib/Analysis/FlatLinearValueConstraints.cpp
mlir/test/Transforms/loop-fusion-4.mlir