[Mlir-commits] [mlir] [mlir][linalg] Fix rank-reducing insert_slice vectorization writing to wrong dims (PR #226490)
Andrzej WarzyĆski
llvmlistbot at llvm.org
Sun Oct 4 04:34:22 PDT 2026
================
@@ -334,3 +345,133 @@ func.func private @insert_slice_non_zero_offset_for_dyn_dim(%source: tensor<?x3x
transform.yield
}
}
+
+// -----
+
+/// A 1-D source inserted down a column: the dropped dim is the trailing one,
+/// so the source's only dim corresponds to result dim 0.
+
+func.func private @insert_slice_1d_source_into_column(
+ %source: tensor<5xi32>) -> tensor<5x3xi32> {
+ %pad = arith.constant 0 : i32
+ %empty = tensor.empty() : tensor<5x3xi32>
+ %init = linalg.fill ins(%pad : i32) outs(%empty : tensor<5x3xi32>) -> tensor<5x3xi32>
+ %res = tensor.insert_slice %source into %init[0, 2] [5, 1] [1, 1] : tensor<5xi32> into tensor<5x3xi32>
+ return %res : tensor<5x3xi32>
+}
----------------
banach-space wrote:
How does it test differ from `@insert_slice_dynamic_src_dim_non_leading_unit_dim_dropped`? As in, does a test a unique code path?
https://github.com/llvm/llvm-project/pull/226490
More information about the Mlir-commits
mailing list