[Mlir-commits] [mlir] [mlir][vector] Fix a `target-rank=0` unrolling (PR #73365)
Cullen Rhodes
llvmlistbot at llvm.org
Thu Nov 30 02:48:08 PST 2023
================
@@ -748,3 +749,16 @@ func.func @cannot_fully_unroll_transfer_write_of_nd_scalable_vector(%vec: vector
vector.transfer_write %vec, %memref[%c0, %c0] {in_bounds = [true, true]} : vector<[4]x[4]xf32>, memref<?x?xf32>
return
}
+
+// -----
+
+// TARGET-RANK-ZERO-LABEL: func @unroll_transfer_write_target_rank_zero
+func.func @unroll_transfer_write_target_rank_zero(%vec : vector<2xi32>) {
+ // TARGET-RANK-ZERO: %[[EXTRACTED:.*]] = vector.extract
+ // TARGET-RANK-ZERO: %[[BROADCASTED:.*]] = vector.broadcast %[[EXTRACTED]]
+ // TARGET-RANK-ZERO: vector.transfer_write %[[BROADCASTED]]
----------------
c-rhodes wrote:
nit: I would find it helpful if the types and both extract/broadcast/transfer_write sequences were CHECK'ed
https://github.com/llvm/llvm-project/pull/73365
More information about the Mlir-commits
mailing list