[Mlir-commits] [mlir] [mlir][vector] Fix crash in ReorderCastOpsOnBroadcast with non-vector result (PR #170985)
Andrzej WarzyĆski
llvmlistbot at llvm.org
Mon Dec 8 10:26:41 PST 2025
================
@@ -850,3 +850,20 @@ func.func @negative_store_no_single_use(%arg0: memref<?xf32>, %arg1: index, %arg
vector.store %0, %arg0[%arg1] : memref<?xf32>, vector<1xf32>
return %0 : vector<1xf32>
}
+
+// -----
+
+// CHECK-LABEL: func.func @broadcast_cast_non_vector_result
+// CHECK-SAME: (%[[ARG:.*]]: i64)
+// CHECK: %[[BCAST:.*]] = vector.broadcast %[[ARG]] : i64 to vector<26x7xi64>
+// CHECK: %[[CAST:.*]] = builtin.unrealized_conversion_cast %[[BCAST]] : vector<26x7xi64> to !llvm.array<26 x vector<7xi64>>
+// CHECK: return %[[CAST]] : !llvm.array<26 x vector<7xi64>>
+/// This test ensures that the `ReorderCastOpsOnBroadcast` pattern does not
----------------
banach-space wrote:
Tests for this pattern are located below this block comment: https://github.com/llvm/llvm-project/blob/bc9f96a5e62d0b89588092343d137995811a9b80/mlir/test/Dialect/Vector/vector-sink.mlir#L339
Please move it accordingly. Thanks!
https://github.com/llvm/llvm-project/pull/170985
More information about the Mlir-commits
mailing list