[mlir][affine] Normalize constant valued bound loop
authorKai Sasaki <lewuathe@gmail.com>
Tue, 14 Feb 2023 02:15:07 +0000 (11:15 +0900)
committerKai Sasaki <lewuathe@gmail.com>
Tue, 14 Feb 2023 03:23:32 +0000 (12:23 +0900)
commit48f04ffa9f3611a60371c968498c5d3326466f9f
treecf0a3f26b99655f9135b98bd9b26337616d6fc95
parent6d4a674acbc56458bb084878d82d16e393d45a6b
[mlir][affine] Normalize constant valued bound loop

This change aims to resolve the issue reported in https://github.com/llvm/llvm-project/issues/59994.

After calling AffineForOp#setUpperBound and setLowerBound, it makes the original affine map structure inconsistent. It's necessary to keep the original map to build the new induction vars.

Reviewed By: bondhugula

Differential Revision: https://reviews.llvm.org/D142082
mlir/lib/Dialect/Affine/Utils/Utils.cpp
mlir/test/Dialect/Affine/affine-loop-normalize.mlir