[Mlir-commits] [mlir] [mlir][Vector] add vector.insert canonicalization pattern to convert a chain of insertions to vector.from_elements (PR #142944)
Yang Bai
llvmlistbot at llvm.org
Tue Aug 19 06:05:39 PDT 2025
yangtetris wrote:
> Oh thanks for sharing this, I didn't notice the other PR. Do we know if from_elements unrolling works for SPIR-V? When we start canonicalizing to from_elements, we will have to support lowering to SPIR-V too. We do have support for converting from_elemtents 1d vectors to `spirv.CompositeConstruct`, but I think we'd have to at least have a test that exercises this in combination with unrolling.
Theoretically it should work, but I haven't tested this before. I will add a test in the next PR, perhaps along with the flattening-based N-D -> 1-D transformation that we discussed in the multi-dimensional from_elements [PR](https://github.com/llvm/llvm-project/pull/151175).
https://github.com/llvm/llvm-project/pull/142944
More information about the Mlir-commits
mailing list