[Mlir-commits] [mlir] [MLIR][Vector] Add unroll pattern for vector.shape_cast (PR #164010)
Andrzej WarzyĆski
llvmlistbot at llvm.org
Thu Oct 23 01:03:10 PDT 2025
================
@@ -496,3 +496,61 @@ func.func @elementwise_4D_to_2D(%v1: vector<2x2x2x2xf32>, %v2: vector<2x2x2x2xf3
// CHECK-COUNT-4: arith.addf %{{.*}}, %{{.*}} : vector<2x2xf32>
// CHECK-NOT: arith.addf
// CHECK: return
+
+func.func @shape_cast_1D_to_2D(%v: vector<8xf32>) -> vector<4x2xf32> {
+ %0 = vector.shape_cast %v : vector<8xf32> to vector<4x2xf32>
+ return %0 : vector<4x2xf32>
+}
+
+// CHECK-LABEL: func @shape_cast_1D_to_2D
+// CHECK-SAME: (%[[ARG0:.*]]: vector<8xf32>) -> vector<4x2xf32>
----------------
banach-space wrote:
[nit] To match the MLIR name
```suggestion
// CHECK-SAME: (%[[V:.*]]: vector<8xf32>) -> vector<4x2xf32>
```
https://github.com/llvm/llvm-project/pull/164010
More information about the Mlir-commits
mailing list