[Mlir-commits] [mlir] [mlir][affine] Add SimplifyAffineLoopWithConstant pattern to affine-simplify-with-bounds pass (PR #209396)

lonely eagle llvmlistbot at llvm.org
Tue Aug 4 02:12:50 PDT 2026


linuxlonelyeagle wrote:

I've been thinking about this further, and the changes in this PR might not be the best approach. I initially wondered if we could implement a generic canonicalize method for ValueBoundOpInterface (to canonicalize a Value into a constant op), but since the bound information is tied via populateBoundsForIndexValue, this idea doesn't seem feasible.

Since bound information originates from the op's original attributes, we should implement canonicalization methods for specific ops instead. I think test.value_with_bounds here is just a test op, which is why it doesn't have a canonicalization method and exists purely for testing purposes. If it had a canonicalize method, we would be able to turn it into a constant.

Maybe this idea is batter.

https://github.com/llvm/llvm-project/pull/209396


More information about the Mlir-commits mailing list