Skip to content

Commit 7df6355

Browse files
committed
move tests for removed pattern to location of subsuming pattern's tests
1 parent af69672 commit 7df6355

File tree

2 files changed

+25
-24
lines changed

2 files changed

+25
-24
lines changed

mlir/test/Dialect/Vector/canonicalize.mlir

Lines changed: 0 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -2218,30 +2218,6 @@ func.func @shuffle_nofold1(%v0 : vector<4xi32>, %v1 : vector<2xi32>) -> vector<5
22182218

22192219
// -----
22202220

2221-
// CHECK-LABEL: func @transpose_scalar_broadcast1
2222-
// CHECK-SAME: (%[[ARG:.+]]: vector<1xf32>)
2223-
// CHECK: %[[V:.+]] = vector.broadcast %[[ARG]] : vector<1xf32> to vector<1x8xf32>
2224-
// CHECK: return %[[V]] : vector<1x8xf32>
2225-
func.func @transpose_scalar_broadcast1(%value: vector<1xf32>) -> vector<1x8xf32> {
2226-
%bcast = vector.broadcast %value : vector<1xf32> to vector<8x1xf32>
2227-
%t = vector.transpose %bcast, [1, 0] : vector<8x1xf32> to vector<1x8xf32>
2228-
return %t : vector<1x8xf32>
2229-
}
2230-
2231-
// -----
2232-
2233-
// CHECK-LABEL: func @transpose_scalar_broadcast2
2234-
// CHECK-SAME: (%[[ARG:.+]]: f32)
2235-
// CHECK: %[[V:.+]] = vector.broadcast %[[ARG]] : f32 to vector<1x8xf32>
2236-
// CHECK: return %[[V]] : vector<1x8xf32>
2237-
func.func @transpose_scalar_broadcast2(%value: f32) -> vector<1x8xf32> {
2238-
%bcast = vector.broadcast %value : f32 to vector<8x1xf32>
2239-
%t = vector.transpose %bcast, [1, 0] : vector<8x1xf32> to vector<1x8xf32>
2240-
return %t : vector<1x8xf32>
2241-
}
2242-
2243-
// -----
2244-
22452221
// CHECK-LABEL: func @transpose_splat_constant
22462222
// CHECK: %[[CST:.+]] = arith.constant dense<5.000000e+00> : vector<8x4xf32>
22472223
// CHECK: return %[[CST]]

mlir/test/Dialect/Vector/canonicalize/vector-transpose.mlir

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,31 @@
22

33
// This file contains some canonicalizations tests involving vector.transpose.
44

5+
// CHECK-LABEL: func @transpose_scalar_broadcast1
6+
// CHECK-SAME: (%[[ARG:.+]]: vector<1xf32>)
7+
// CHECK: %[[V:.+]] = vector.broadcast %[[ARG]] : vector<1xf32> to vector<1x8xf32>
8+
// CHECK: return %[[V]] : vector<1x8xf32>
9+
func.func @transpose_scalar_broadcast1(%value: vector<1xf32>) -> vector<1x8xf32> {
10+
%bcast = vector.broadcast %value : vector<1xf32> to vector<8x1xf32>
11+
%t = vector.transpose %bcast, [1, 0] : vector<8x1xf32> to vector<1x8xf32>
12+
return %t : vector<1x8xf32>
13+
}
14+
15+
// -----
16+
17+
// CHECK-LABEL: func @transpose_scalar_broadcast2
18+
// CHECK-SAME: (%[[ARG:.+]]: f32)
19+
// CHECK: %[[V:.+]] = vector.broadcast %[[ARG]] : f32 to vector<1x8xf32>
20+
// CHECK: return %[[V]] : vector<1x8xf32>
21+
func.func @transpose_scalar_broadcast2(%value: f32) -> vector<1x8xf32> {
22+
%bcast = vector.broadcast %value : f32 to vector<8x1xf32>
23+
%t = vector.transpose %bcast, [1, 0] : vector<8x1xf32> to vector<1x8xf32>
24+
return %t : vector<1x8xf32>
25+
}
26+
27+
// -----
28+
29+
530
// CHECK-LABEL: broadcast_transpose_scalar_to_broadcast
631
// CHECK-SAME: %[[ARG:.*]]: i8) -> vector<2x3x4xi8> {
732
func.func @broadcast_transpose_scalar_to_broadcast(%arg0 : i8) -> vector<2x3x4xi8> {

0 commit comments

Comments
 (0)