[Mlir-commits] [mlir] [mlir][vector] Support complete folding in single pass for vector.insert/vector.extract (PR #142124)

Mehdi Amini llvmlistbot at llvm.org
Tue Jun 10 13:24:12 PDT 2025


joker-eph wrote:

>  is appropriate for testing how many times the folder is invoked - and as far as I know, MLIR doesn’t currently test that sort of internal behavior.

I find this framing a bit weird: the "how many times the folder is invoked" is a canonicalizer question, however the behavior of the folder outside of canonicalization is interesting. A simple walk + fold behavior is something that is worth it to the user.

> That’s why I’m hesitant to use -test-constant-fold for this. It happens to run the folder once today, but that’s not its design goal, and that behaviour could change at any time.

What is the design goal for this pass? 
As far as I know this is only "Test operation constant folding", which we can easily refine to define whatever we want right now. Including option for walking in various orders.
I don't see the need for a new pass right now, this pass seems appropriate to me, just need to be extended / documenting the behavior we expect to test.


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


More information about the Mlir-commits mailing list