[MLIR] Avoid creation of buggy affine maps while replacing dimension and symbol
authorArnab Dutta <arnab.dutta@cerebras.net>
Sat, 20 Nov 2021 06:30:49 +0000 (12:00 +0530)
committerUday Bondhugula <uday@polymagelabs.com>
Sat, 20 Nov 2021 06:31:29 +0000 (12:01 +0530)
commit1f9ca5adbac08dcca73b9e12aa2c5ed777cc460e
tree3f3409f5cb9ded1b5a1a213117be9a7ab535f4f9
parenta4373f6753fa9aa89d39fbd4ec9e273f76459a58
[MLIR] Avoid creation of buggy affine maps while replacing dimension and symbol

Initially before appending the newly composed dimension and symbols
to the dimension and symbol list whose size is to be passed in
AffineMap::get(), the call to the AffineMap::get() was made, resulting
in wrong dimCount and symbolCount being passed as argument. We move the
call to the AffineMap::get() after the diimension and symbol list are
updated.

Differential Revision: https://reviews.llvm.org/D114237
mlir/lib/Dialect/Affine/IR/AffineOps.cpp