@@ -100,25 +100,21 @@ func.func @negative_transpose_to_shape_cast(%arg : vector<1x4x4x1xi8>) -> vector
100
100
101
101
// -----
102
102
103
- // Currently the conversion shape_cast(transpose) -> shape_cast is disabled for
104
- // scalable vectors because of bad interaction with ConvertIllegalShapeCastOpsToTransposes
105
- // CHECK-LABEL: @negative_shape_cast_of_transpose_scalable
106
- // CHECK: vector.transpose
107
- // CHECK: vector.shape_cast
108
- func.func @negative_shape_cast_of_transpose_scalable (%arg : vector <[4 ]x1 xi8 >) -> vector <[4 ]xi8 > {
103
+ // CHECK-LABEL: @shape_cast_of_transpose_scalable
104
+ // CHECK-NEXT: vector.shape_cast
105
+ // CHECK-NEXT: return
106
+ func.func @shape_cast_of_transpose_scalable (%arg : vector <[4 ]x1 xi8 >) -> vector <[4 ]xi8 > {
109
107
%0 = vector.transpose %arg , [1 , 0 ] : vector <[4 ]x1 xi8 > to vector <1 x[4 ]xi8 >
110
108
%1 = vector.shape_cast %0 : vector <1 x[4 ]xi8 > to vector <[4 ]xi8 >
111
109
return %1 : vector <[4 ]xi8 >
112
110
}
113
111
114
112
// -----
115
113
116
- // The conversion transpose(shape_cast) -> shape_cast is currently disabled for scalable
117
- // vectors.
118
- // CHECK-LABEL: @negative_transpose_of_shape_cast_scalable
119
- // CHECK: vector.shape_cast
120
- // CHECK: vector.transpose
121
- func.func @negative_transpose_of_shape_cast_scalable (%arg : vector <[4 ]xi8 >) -> vector <[4 ]x1 xi8 > {
114
+ // CHECK-LABEL: @transpose_of_shape_cast_scalable
115
+ // CHECK-NEXT: vector.shape_cast
116
+ // CHECK-NEXT: return
117
+ func.func @transpose_of_shape_cast_scalable (%arg : vector <[4 ]xi8 >) -> vector <[4 ]x1 xi8 > {
122
118
%0 = vector.shape_cast %arg : vector <[4 ]xi8 > to vector <1 x[4 ]xi8 >
123
119
%1 = vector.transpose %0 , [1 , 0 ] : vector <1 x[4 ]xi8 > to vector <[4 ]x1 xi8 >
124
120
return %1 : vector <[4 ]x1 xi8 >
0 commit comments