Skip to content

Commit 5753fbc

Browse files
committed
fold shape_casts now
1 parent b04d869 commit 5753fbc

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

mlir/test/Dialect/Vector/CPU/X86/vector-transpose-lowering.mlir

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,7 @@ func.func @transpose4x8xf32(%arg0: vector<4x8xf32>) -> vector<8x4xf32> {
2626
// CHECK-NEXT: vector.insert {{.*}}[1]
2727
// CHECK-NEXT: vector.insert {{.*}}[2]
2828
// CHECK-NEXT: vector.insert {{.*}}[3]
29-
// CHECK-NEXT: vector.shape_cast {{.*}} vector<4x8xf32> to vector<32xf32>
30-
// CHECK-NEXT: vector.shape_cast {{.*}} vector<32xf32> to vector<8x4xf32>
29+
// CHECK-NEXT: vector.shape_cast {{.*}} vector<4x8xf32> to vector<8x4xf32>
3130
%0 = vector.transpose %arg0, [1, 0] : vector<4x8xf32> to vector<8x4xf32>
3231
return %0 : vector<8x4xf32>
3332
}
@@ -54,8 +53,7 @@ func.func @transpose021_1x4x8xf32(%arg0: vector<1x4x8xf32>) -> vector<1x8x4xf32>
5453
// CHECK-NEXT: vector.insert {{.*}}[1]
5554
// CHECK-NEXT: vector.insert {{.*}}[2]
5655
// CHECK-NEXT: vector.insert {{.*}}[3]
57-
// CHECK-NEXT: vector.shape_cast {{.*}} vector<4x8xf32> to vector<32xf32>
58-
// CHECK-NEXT: vector.shape_cast {{.*}} vector<32xf32> to vector<1x8x4xf32>
56+
// CHECK-NEXT: vector.shape_cast {{.*}} vector<4x8xf32> to vector<1x8x4xf32>
5957
%0 = vector.transpose %arg0, [0, 2, 1] : vector<1x4x8xf32> to vector<1x8x4xf32>
6058
return %0 : vector<1x8x4xf32>
6159
}

0 commit comments

Comments
 (0)