[Mlir-commits] [mlir] [mlir][vector] Folder: shape_cast(extract) -> extract (PR #146368)
Andrzej Warzyński
llvmlistbot at llvm.org
Mon Jul 21 09:28:49 PDT 2025
================
@@ -890,6 +929,19 @@ func.func @fold_extract_broadcast_to_equal_rank(%a : vector<1xf32>, %idx0 : inde
// -----
+// CHECK-LABEL: fold_extract_broadcastlike_shape_cast
+// CHECK-SAME: %[[A:.*]]: vector<1xf32>
+// CHECK: %[[R:.*]] = vector.broadcast %[[A]] : vector<1xf32> to vector<1x1xf32>
----------------
banach-space wrote:
Since the number of elements doesn't change, why not `vector.shape_cast`? Just trying to recall the overall direction 😅 (I thought that we wanted `vector.shape_cast` for everything that's a no-op).
https://github.com/llvm/llvm-project/pull/146368
More information about the Mlir-commits
mailing list