1- // RUN: mlir-opt %s -split-input-file -test-convert-to-shape-cast | FileCheck %s
1+ // RUN: mlir-opt %s -split-input-file -test-convert-to-shape-cast | FileCheck %s
22
33
44// CHECK-LABEL: @transpose_to_shape_cast
55// CHECK-SAME: %[[ARG0:.*]]: vector<2x1x2xf32>
6- // CHECK-NEXT: %[[SCAST:.*]] = vector.shape_cast %[[ARG0]]
6+ // CHECK-NEXT: %[[SCAST:.*]] = vector.shape_cast %[[ARG0]]
77// CHECK-NEXT: return %[[SCAST]] : vector<2x2x1xf32>
88func.func @transpose_to_shape_cast (%arg0 : vector <2 x1 x2 xf32 >) -> vector <2 x2 x1 xf32 > {
99 %0 = vector.transpose %arg0 , [0 , 2 , 1 ] : vector <2 x1 x2 xf32 > to vector <2 x2 x1 xf32 >
@@ -14,7 +14,7 @@ func.func @transpose_to_shape_cast(%arg0 : vector<2x1x2xf32>) -> vector<2x2x1xf3
1414
1515// CHECK-LABEL: @negative_transpose_to_shape_cast
1616// CHECK-SAME: %[[ARG0:.*]]: vector<2x1x2xf32>
17- // CHECK-NEXT: %[[TRANSPOSE:.*]] = vector.transpose %[[ARG0]], [2, 0, 1]
17+ // CHECK-NEXT: %[[TRANSPOSE:.*]] = vector.transpose %[[ARG0]], [2, 0, 1]
1818// CHECK-NEXT: return %[[TRANSPOSE]] : vector<2x2x1xf32>
1919func.func @negative_transpose_to_shape_cast (%arg0 : vector <2 x1 x2 xf32 >) -> vector <2 x2 x1 xf32 > {
2020 %0 = vector.transpose %arg0 , [2 , 0 , 1 ] : vector <2 x1 x2 xf32 > to vector <2 x2 x1 xf32 >
@@ -36,7 +36,7 @@ func.func @broadcast_to_shape_cast(%arg0 : vector<4xi8>) -> vector<1x1x4xi8> {
3636
3737// CHECK-LABEL: @negative_broadcast_to_shape_cast
3838// CHECK-NOT: shape_cast
39- // CHECK: return
39+ // CHECK: return
4040func.func @negative_broadcast_to_shape_cast (%arg0 : vector <1 x4 xi8 >) -> vector <2 x3 x4 xi8 > {
4141 %0 = vector.broadcast %arg0 : vector <1 x4 xi8 > to vector <2 x3 x4 xi8 >
4242 return %0 : vector <2 x3 x4 xi8 >
@@ -55,7 +55,7 @@ func.func @extract_to_shape_cast(%arg0 : vector<1x4xf32>) -> vector<4xf32> {
5555
5656// -----
5757
58- // In this example, arg1 might be negative indicating poison.
58+ // In this example, arg1 might be negative indicating poison.
5959// CHECK-LABEL: @negative_extract_to_shape_cast
6060// CHECK-NOT: shape_cast
6161func.func @negative_extract_to_shape_cast (%arg0 : vector <1 x4 xf32 >, %arg1 : index ) -> vector <4 xf32 > {
0 commit comments