[Mlir-commits] [mlir] [mlir][vector] Adds ToElementsToTargetShape pattern. (PR #166476)
Jakub Kuderski
llvmlistbot at llvm.org
Fri Nov 7 09:51:31 PST 2025
================
@@ -120,6 +120,22 @@ func.func @unroll_to_elements_2d() -> (f32, f32, f32, f32) {
// -----
+// CHECK-LABEL: @unroll_to_elements_8xf32
+func.func @unroll_to_elements_8xf32() -> (f32, f32) {
+
+ // CHECK: %[[VEC:.+]] = "test.op"
+ // CHECK: %[[V0:.+]] = vector.extract_strided_slice %[[VEC]] {offsets = [0]
+ // CHECK: %[[V1:.+]] = vector.extract_strided_slice %[[VEC]] {offsets = [4]
+ // CHECK: %[[ELEMS0:.+]]:4 = vector.to_elements %[[V0]]
+ // CHECK: %[[ELEMS1:.+]]:4 = vector.to_elements %[[V1]]
+ // CHECK: return %[[ELEMS0]]#3, %[[ELEMS1]]#0
+ %0 = "test.op"() : () -> (vector<8xf32>)
----------------
kuhar wrote:
why not make it the function argument?
https://github.com/llvm/llvm-project/pull/166476
More information about the Mlir-commits
mailing list