@@ -61,7 +61,7 @@ func.func @negative_scalable_unit_dim(%in: memref<1x1x8x1xf32, strided<[3072, 8,
61
61
%0 = vector.transfer_read %in [%c0 , %c0 , %c0 , %c0 ], %cst {in_bounds = [true , true , true ]} : memref <1 x1 x8 x1 xf32 , strided <[3072 , 8 , 1 , 1 ], offset : ?>>, vector <1 x8 x[1 ]xf32 >
62
62
return %0 : vector <1 x8 x[1 ]xf32 >
63
63
}
64
- // CHECK-LABEL: func @scalable_unit_dim
64
+ // CHECK-LABEL: func @negative_scalable_unit_dim
65
65
// CHECK-NOT: memref.subview
66
66
// CHECK-NOT: vector.shape_cast
67
67
@@ -257,3 +257,16 @@ func.func @leading_scalable_dimension_transfer_write(%dest : memref<24x1xf32>, %
257
257
// CHECK: %[[SUBVIEW:.+]] = memref.subview %[[DEST]][0, 0] [24, 1] [1, 1] : memref<24x1xf32> to memref<24xf32, strided<[1]>>
258
258
// CHECK: %[[CAST:.+]] = vector.shape_cast %[[VEC]] : vector<[4]x1xf32> to vector<[4]xf32>
259
259
// CHECK: vector.transfer_write %[[CAST]], %[[SUBVIEW]]{{.*}} {in_bounds = [true]} : vector<[4]xf32>, memref<24xf32, strided<[1]>>
260
+
261
+ // -----
262
+
263
+ // Negative test: [1] (scalable 1) is _not_ a unit dimension.
264
+ func.func @trailing_scalable_one_dim_transfer_write (%dest : memref <24 x1 xf32 >, %vec: vector <4 x[1 ]xf32 >, %index: index ) {
265
+ %c0 = arith.constant 0 : index
266
+ vector.transfer_write %vec , %dest [%index , %c0 ] {in_bounds = [true , true ]} : vector <4 x[1 ]xf32 >, memref <24 x1 xf32 >
267
+ return
268
+ }
269
+ // CHECK: func.func @trailing_scalable_one_dim_transfer_write
270
+ // CHECK-NOT: vector.shape_cast
271
+ // CHECK: vector.transfer_write {{.*}} : vector<4x[1]xf32>, memref<24x1xf32>
272
+ // CHECK-NOT: vector.shape_cast
0 commit comments