@@ -40,7 +40,7 @@ func.func @broadcast_scalar_with_bcast_scalable(%arg1: index, %arg2: index) -> v
40
40
// CHECK: %[[BCAST:.*]] = vector.broadcast %[[ADD]] : index to vector<1x4xindex>
41
41
// CHECK: return %[[BCAST]] : vector<1x4xindex>
42
42
func.func @broadcast_scalar_with_bcast_and_splat (%arg1: index , %arg2: index ) -> vector <1 x4 xindex > {
43
- %0 = vector.splat %arg1 : vector <1 x4 xindex >
43
+ %0 = vector.broadcast %arg1 : index to vector <1 x4 xindex >
44
44
%1 = vector.broadcast %arg2 : index to vector <1 x4 xindex >
45
45
%2 = arith.addi %0 , %1 : vector <1 x4 xindex >
46
46
return %2 : vector <1 x4 xindex >
@@ -53,7 +53,7 @@ func.func @broadcast_scalar_with_bcast_and_splat(%arg1: index, %arg2: index) ->
53
53
// CHECK: %[[BCAST:.*]] = vector.broadcast %[[ADD]] : index to vector<1x[4]xindex>
54
54
// CHECK: return %[[BCAST]] : vector<1x[4]xindex>
55
55
func.func @broadcast_scalar_with_bcast_and_splat_scalable (%arg1: index , %arg2: index ) -> vector <1 x[4 ]xindex > {
56
- %0 = vector.splat %arg1 : vector <1 x[4 ]xindex >
56
+ %0 = vector.broadcast %arg1 : index to vector <1 x[4 ]xindex >
57
57
%1 = vector.broadcast %arg2 : index to vector <1 x[4 ]xindex >
58
58
%2 = arith.addi %0 , %1 : vector <1 x[4 ]xindex >
59
59
return %2 : vector <1 x[4 ]xindex >
@@ -94,12 +94,12 @@ func.func @broadcast_vector_scalable(%arg1: vector<[4]xf32>, %arg2: vector<[4]xf
94
94
// CHECK-LABEL: func.func @broadcast_scalar_and_vec(
95
95
// CHECK-SAME: %[[ARG1:.*]]: index,
96
96
// CHECK-SAME: %[[ARG2:.*]]: vector<4xindex>) -> vector<1x4xindex> {
97
- // CHECK: %[[SPLAT:.*]] = vector.splat %[[ARG1]] : vector<1x4xindex>
97
+ // CHECK: %[[SPLAT:.*]] = vector.broadcast %[[ARG1]] : index to vector<1x4xindex>
98
98
// CHECK: %[[BCAST:.*]] = vector.broadcast %[[ARG2]] : vector<4xindex> to vector<1x4xindex>
99
99
// CHECK: %[[ADD:.*]] = arith.addi %[[SPLAT]], %[[BCAST]] : vector<1x4xindex>
100
100
// CHECK: return %[[ADD]] : vector<1x4xindex>
101
101
func.func @broadcast_scalar_and_vec (%arg1: index , %arg2: vector <4 xindex >) -> vector <1 x4 xindex > {
102
- %0 = vector.splat %arg1 : vector <1 x4 xindex >
102
+ %0 = vector.broadcast %arg1 : index to vector <1 x4 xindex >
103
103
%1 = vector.broadcast %arg2 : vector <4 xindex > to vector <1 x4 xindex >
104
104
%2 = arith.addi %0 , %1 : vector <1 x4 xindex >
105
105
return %2 : vector <1 x4 xindex >
@@ -108,12 +108,12 @@ func.func @broadcast_scalar_and_vec(%arg1: index, %arg2: vector<4xindex>) -> vec
108
108
// CHECK-LABEL: func.func @broadcast_scalar_and_vec_scalable(
109
109
// CHECK-SAME: %[[ARG1:.*]]: index,
110
110
// CHECK-SAME: %[[ARG2:.*]]: vector<[4]xindex>) -> vector<1x[4]xindex> {
111
- // CHECK: %[[SPLAT:.*]] = vector.splat %[[ARG1]] : vector<1x[4]xindex>
111
+ // CHECK: %[[SPLAT:.*]] = vector.broadcast %[[ARG1]] : index to vector<1x[4]xindex>
112
112
// CHECK: %[[BCAST:.*]] = vector.broadcast %[[ARG2]] : vector<[4]xindex> to vector<1x[4]xindex>
113
113
// CHECK: %[[ADD:.*]] = arith.addi %[[SPLAT]], %[[BCAST]] : vector<1x[4]xindex>
114
114
// CHECK: return %[[ADD]] : vector<1x[4]xindex>
115
115
func.func @broadcast_scalar_and_vec_scalable (%arg1: index , %arg2: vector <[4 ]xindex >) -> vector <1 x[4 ]xindex > {
116
- %0 = vector.splat %arg1 : vector <1 x[4 ]xindex >
116
+ %0 = vector.broadcast %arg1 : index to vector <1 x[4 ]xindex >
117
117
%1 = vector.broadcast %arg2 : vector <[4 ]xindex > to vector <1 x[4 ]xindex >
118
118
%2 = arith.addi %0 , %1 : vector <1 x[4 ]xindex >
119
119
return %2 : vector <1 x[4 ]xindex >
@@ -787,7 +787,7 @@ func.func @negative_extract_load_scalable(%arg0: memref<?xf32>, %arg1: index) ->
787
787
// CHECK-SAME: (%[[ARG0:.*]]: memref<?xf32>, %[[ARG1:.*]]: index, %[[ARG2:.*]]: f32)
788
788
func.func @store_splat (%arg0: memref <?xf32 >, %arg1: index , %arg2: f32 ) {
789
789
// CHECK: memref.store %[[ARG2]], %[[ARG0]][%[[ARG1]]] : memref<?xf32>
790
- %0 = vector.splat %arg2 : vector <1 xf32 >
790
+ %0 = vector.broadcast %arg2 : f32 to vector <1 xf32 >
791
791
vector.store %0 , %arg0 [%arg1 ] : memref <?xf32 >, vector <1 xf32 >
792
792
return
793
793
}
@@ -813,40 +813,40 @@ func.func @store_broadcast_1d_to_2d(%arg0: memref<?x?xf32>, %arg1: index, %arg2:
813
813
// CHECK-LABEL: @negative_store_scalable
814
814
// CHECK-SAME: (%[[ARG0:.*]]: memref<?xf32>, %[[ARG1:.*]]: index, %[[ARG2:.*]]: f32)
815
815
func.func @negative_store_scalable (%arg0: memref <?xf32 >, %arg1: index , %arg2: f32 ) {
816
- // CHECK: %[[RES:.*]] = vector.splat %[[ARG2]] : vector<[1]xf32>
816
+ // CHECK: %[[RES:.*]] = vector.broadcast %[[ARG2]] : f32 to vector<[1]xf32>
817
817
// CHECK: vector.store %[[RES]], %[[ARG0]][%[[ARG1]]] : memref<?xf32>, vector<[1]xf32>
818
- %0 = vector.splat %arg2 : vector <[1 ]xf32 >
818
+ %0 = vector.broadcast %arg2 : f32 to vector <[1 ]xf32 >
819
819
vector.store %0 , %arg0 [%arg1 ] : memref <?xf32 >, vector <[1 ]xf32 >
820
820
return
821
821
}
822
822
823
823
// CHECK-LABEL: @negative_store_memref_of_vec
824
824
// CHECK-SAME: (%[[ARG0:.*]]: memref<?xvector<1xf32>>, %[[ARG1:.*]]: index, %[[ARG2:.*]]: f32)
825
825
func.func @negative_store_memref_of_vec (%arg0: memref <?xvector <1 xf32 >>, %arg1: index , %arg2: f32 ) {
826
- // CHECK: %[[RES:.*]] = vector.splat %[[ARG2]] : vector<1xf32>
826
+ // CHECK: %[[RES:.*]] = vector.broadcast %[[ARG2]] : f32 to vector<1xf32>
827
827
// CHECK: vector.store %[[RES]], %[[ARG0]][%[[ARG1]]] : memref<?xvector<1xf32>>, vector<1xf32>
828
- %0 = vector.splat %arg2 : vector <1 xf32 >
828
+ %0 = vector.broadcast %arg2 : f32 to vector <1 xf32 >
829
829
vector.store %0 , %arg0 [%arg1 ] : memref <?xvector <1 xf32 >>, vector <1 xf32 >
830
830
return
831
831
}
832
832
833
833
// CHECK-LABEL: @negative_store_more_than_one_element
834
834
// CHECK-SAME: (%[[ARG0:.*]]: memref<?xf32>, %[[ARG1:.*]]: index, %[[ARG2:.*]]: f32)
835
835
func.func @negative_store_more_than_one_element (%arg0: memref <?xf32 >, %arg1: index , %arg2: f32 ) {
836
- // CHECK: %[[RES:.*]] = vector.splat %[[ARG2]] : vector<4xf32>
836
+ // CHECK: %[[RES:.*]] = vector.broadcast %[[ARG2]] : f32 to vector<4xf32>
837
837
// CHECK: vector.store %[[RES]], %[[ARG0]][%[[ARG1]]] : memref<?xf32>, vector<4xf32>
838
- %0 = vector.splat %arg2 : vector <4 xf32 >
838
+ %0 = vector.broadcast %arg2 : f32 to vector <4 xf32 >
839
839
vector.store %0 , %arg0 [%arg1 ] : memref <?xf32 >, vector <4 xf32 >
840
840
return
841
841
}
842
842
843
843
// CHECK-LABEL: @negative_store_no_single_use
844
844
// CHECK-SAME: (%[[ARG0:.*]]: memref<?xf32>, %[[ARG1:.*]]: index, %[[ARG2:.*]]: f32)
845
845
func.func @negative_store_no_single_use (%arg0: memref <?xf32 >, %arg1: index , %arg2: f32 ) -> vector <1 xf32 > {
846
- // CHECK: %[[RES:.*]] = vector.splat %[[ARG2]] : vector<1xf32>
846
+ // CHECK: %[[RES:.*]] = vector.broadcast %[[ARG2]] : f32 to vector<1xf32>
847
847
// CHECK: vector.store %[[RES]], %[[ARG0]][%[[ARG1]]] : memref<?xf32>, vector<1xf32>
848
848
// CHECK: return %[[RES:.*]] : vector<1xf32>
849
- %0 = vector.splat %arg2 : vector <1 xf32 >
849
+ %0 = vector.broadcast %arg2 : f32 to vector <1 xf32 >
850
850
vector.store %0 , %arg0 [%arg1 ] : memref <?xf32 >, vector <1 xf32 >
851
851
return %0 : vector <1 xf32 >
852
852
}
0 commit comments