[Mlir-commits] [mlir] [mli][vector] canonicalize vector.from_elements from ascending extracts (PR #139819)

Andrzej WarzyƄski llvmlistbot at llvm.org
Thu May 15 06:47:31 PDT 2025


https://github.com/banach-space commented:

Neat, thank you!

The transformation makes sense to me - I've left a couple of comments, but these are minor.

I am unsure about making this a canonicalization and hopefully somebody else could chime in as well. Basically, the IR becomes much simpler (+1), but "data movement" Ops are replaced with an Op for which: 
> It is currently assumed that this operation does not require moving data" 

This makes it a bit tricky for me. In my view, as long as this pattern composes nicely with other transformations (e.g. we don't re-materialise the data movement Ops to "lower" `vector.shape_cast`), it should be safe/fine to include it as a canonicalization.

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


More information about the Mlir-commits mailing list