[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
Thu Aug 21 01:16:07 PDT 2025


yangtetris wrote:

@kuhar I'm trying to check whether the from_elements unrolling works for SPIR-V. However, it's not going smoothly since I'm completely new to SPIR-V. Do you know how we typically convert the following ops to SPIR-V?
```
%0 = ub.poison : vector<2x2xf32>
%2 = vector.insert %1, %0 [0] : vector<2xf32> into vector<2x2xf32>
```
The `test-convert-to-spirv` pass complained about the multi-dimensional vector types and I don't know which pattern to use to preprocess them before conversion.

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


More information about the Mlir-commits mailing list