Skip to content

Commit 96f30e9

Browse files
committed
fixup! [mlir][vector] Add tests xfer-permute-lowering (nfc)(2/n)
Rebase and updated based on recent changes
1 parent 9be1956 commit 96f30e9

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

mlir/test/Dialect/Vector/vector-transfer-permutation-lowering.mlir

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,10 +37,14 @@ func.func @xfer_write_transposing_permutation_map(
3737
// CHECK-LABEL: func.func @xfer_write_transposing_permutation_map_out_of_bounds
3838
// CHECK-SAME: %[[ARG_0:.*]]: vector<4x8xi16>,
3939
// CHECK-SAME: %[[MEM:.*]]: memref<2x2x?x?xi16>) {
40+
// CHECK: %[[C0:.*]] = arith.constant 0 : index
4041
// CHECK: %[[TR:.*]] = vector.transpose %[[ARG_0]], [1, 0] : vector<4x8xi16> to vector<8x4xi16>
42+
// Expect the in_bounds attribute to be preserved. Since we don't print it when
43+
// all flags are "false", it should not appear in the output.
44+
// CHECK-NOT: in_bounds
4145
// CHECK: vector.transfer_write
4246
// CHECK-NOT: permutation_map
43-
// CHECK-SAME: %[[TR]], %[[MEM]]{{.*}} {in_bounds = [false, false]} : vector<8x4xi16>, memref<2x2x?x?xi16>
47+
// CHECK-SAME: %[[TR]], %[[MEM]][%[[C0]], %[[C0]], %[[C0]], %[[C0]]] : vector<8x4xi16>, memref<2x2x?x?xi16>
4448
func.func @xfer_write_transposing_permutation_map_out_of_bounds(
4549
%arg0: vector<4x8xi16>,
4650
%mem: memref<2x2x?x?xi16>) {
@@ -125,7 +129,7 @@ func.func @xfer_write_non_transposing_permutation_map(
125129
return
126130
}
127131

128-
// The broadcast dimension is in bounds, so the transformation is safe
132+
// Even with out-of-bounds, it is safe to apply this pattern
129133
// CHECK-LABEL: func.func @xfer_write_non_transposing_permutation_map_with_mask_out_of_bounds(
130134
// CHECK-SAME: %[[MEM:.*]]: memref<?x?xf32>,
131135
// CHECK-SAME: %[[VEC:.*]]: vector<7xf32>,

0 commit comments

Comments
 (0)