File tree Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -2955,7 +2955,7 @@ OpFoldResult vector::InsertOp::fold(FoldAdaptor adaptor) {
29552955 // Fold "vector.insert %v, %dest [] : vector<2x2xf32> from vector<2x2xf32>" to
29562956 // %v. Note: Do not fold "vector.insert %v, %dest [] : f32 into vector<f32>"
29572957 // (type mismatch).
2958- if (getNumIndices () == 0 && getSourceType () == getResult (). getType ())
2958+ if (getNumIndices () == 0 && getSourceType () == getType ())
29592959 return getSource ();
29602960 return {};
29612961}
Original file line number Diff line number Diff line change @@ -2745,11 +2745,11 @@ func.func @vector_insert_const_regression(%arg0: i8) -> vector<4xi8> {
27452745
27462746// -----
27472747
2748- // CHECK-LABEL: func @insert_into_0d_regression (
2748+ // CHECK-LABEL: func @insert_no_fold_type_mismatch (
27492749// CHECK-SAME: %[[v:.*]]: vector<f32>)
27502750// CHECK: %[[extract:.*]] = vector.insert %{{.*}}, %[[v]] [] : f32 into vector<f32>
27512751// CHECK: return %[[extract]]
2752- func.func @insert_into_0d_regression (%v: vector <f32 >) -> vector <f32 > {
2752+ func.func @insert_no_fold_type_mismatch (%v: vector <f32 >) -> vector <f32 > {
27532753 %cst = arith.constant 0.000000e+00 : f32
27542754 %0 = vector.insert %cst , %v [] : f32 into vector <f32 >
27552755 return %0 : vector <f32 >
You can’t perform that action at this time.
0 commit comments