[Mlir-commits] [mlir] [MLIR][Vector] Fix bug in ExtractStrideSlicesOp canonicalization (PR #147591)

Andrzej WarzyƄski llvmlistbot at llvm.org
Thu Jul 10 08:51:17 PDT 2025


================
@@ -1344,6 +1344,20 @@ func.func @extract_strided_broadcast4(%arg0: f32) -> vector<1x4xf32> {
 
 // -----
 
+// CHECK-LABEL: func @extract_strided_broadcast5
+//  CHECK-SAME: (%[[ARG:.+]]: vector<2x1xf32>)
+//       CHECK: %[[V:.+]] = vector.broadcast %[[ARG]] : vector<2x1xf32> to vector<2x4xf32>
+//       CHECK: return %[[V]]
+func.func @extract_strided_broadcast5(%arg0: vector<2x1xf32>) -> vector<2x4xf32> {
----------------
banach-space wrote:

I see that you are simply following the pre-existing naming convention here, which is the most natural thing to do. Sadly, this function name does not reveal what makes this case unique. Could you add a comment to explain? IIUC, it's the fact that the _trailing_ unit dim is broadcasted?

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


More information about the Mlir-commits mailing list