@@ -40,7 +40,7 @@ func.func @broadcast_scalar_with_bcast_scalable(%arg1: index, %arg2: index) -> v
4040// CHECK: %[[BCAST:.*]] = vector.broadcast %[[ADD]] : index to vector<1x4xindex>
4141// CHECK: return %[[BCAST]] : vector<1x4xindex>
4242func.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 >
4444 %1 = vector.broadcast %arg2 : index to vector <1 x4 xindex >
4545 %2 = arith.addi %0 , %1 : vector <1 x4 xindex >
4646 return %2 : vector <1 x4 xindex >
@@ -53,7 +53,7 @@ func.func @broadcast_scalar_with_bcast_and_splat(%arg1: index, %arg2: index) ->
5353// CHECK: %[[BCAST:.*]] = vector.broadcast %[[ADD]] : index to vector<1x[4]xindex>
5454// CHECK: return %[[BCAST]] : vector<1x[4]xindex>
5555func.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 >
5757 %1 = vector.broadcast %arg2 : index to vector <1 x[4 ]xindex >
5858 %2 = arith.addi %0 , %1 : vector <1 x[4 ]xindex >
5959 return %2 : vector <1 x[4 ]xindex >
@@ -94,12 +94,12 @@ func.func @broadcast_vector_scalable(%arg1: vector<[4]xf32>, %arg2: vector<[4]xf
9494// CHECK-LABEL: func.func @broadcast_scalar_and_vec(
9595// CHECK-SAME: %[[ARG1:.*]]: index,
9696// 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>
9898// CHECK: %[[BCAST:.*]] = vector.broadcast %[[ARG2]] : vector<4xindex> to vector<1x4xindex>
9999// CHECK: %[[ADD:.*]] = arith.addi %[[SPLAT]], %[[BCAST]] : vector<1x4xindex>
100100// CHECK: return %[[ADD]] : vector<1x4xindex>
101101func.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 >
103103 %1 = vector.broadcast %arg2 : vector <4 xindex > to vector <1 x4 xindex >
104104 %2 = arith.addi %0 , %1 : vector <1 x4 xindex >
105105 return %2 : vector <1 x4 xindex >
@@ -108,12 +108,12 @@ func.func @broadcast_scalar_and_vec(%arg1: index, %arg2: vector<4xindex>) -> vec
108108// CHECK-LABEL: func.func @broadcast_scalar_and_vec_scalable(
109109// CHECK-SAME: %[[ARG1:.*]]: index,
110110// 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>
112112// CHECK: %[[BCAST:.*]] = vector.broadcast %[[ARG2]] : vector<[4]xindex> to vector<1x[4]xindex>
113113// CHECK: %[[ADD:.*]] = arith.addi %[[SPLAT]], %[[BCAST]] : vector<1x[4]xindex>
114114// CHECK: return %[[ADD]] : vector<1x[4]xindex>
115115func.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 >
117117 %1 = vector.broadcast %arg2 : vector <[4 ]xindex > to vector <1 x[4 ]xindex >
118118 %2 = arith.addi %0 , %1 : vector <1 x[4 ]xindex >
119119 return %2 : vector <1 x[4 ]xindex >
@@ -787,7 +787,7 @@ func.func @negative_extract_load_scalable(%arg0: memref<?xf32>, %arg1: index) ->
787787// CHECK-SAME: (%[[ARG0:.*]]: memref<?xf32>, %[[ARG1:.*]]: index, %[[ARG2:.*]]: f32)
788788func.func @store_splat (%arg0: memref <?xf32 >, %arg1: index , %arg2: f32 ) {
789789// 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 >
791791 vector.store %0 , %arg0 [%arg1 ] : memref <?xf32 >, vector <1 xf32 >
792792 return
793793}
@@ -813,40 +813,40 @@ func.func @store_broadcast_1d_to_2d(%arg0: memref<?x?xf32>, %arg1: index, %arg2:
813813// CHECK-LABEL: @negative_store_scalable
814814// CHECK-SAME: (%[[ARG0:.*]]: memref<?xf32>, %[[ARG1:.*]]: index, %[[ARG2:.*]]: f32)
815815func.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>
817817// 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 >
819819 vector.store %0 , %arg0 [%arg1 ] : memref <?xf32 >, vector <[1 ]xf32 >
820820 return
821821}
822822
823823// CHECK-LABEL: @negative_store_memref_of_vec
824824// CHECK-SAME: (%[[ARG0:.*]]: memref<?xvector<1xf32>>, %[[ARG1:.*]]: index, %[[ARG2:.*]]: f32)
825825func.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>
827827// 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 >
829829 vector.store %0 , %arg0 [%arg1 ] : memref <?xvector <1 xf32 >>, vector <1 xf32 >
830830 return
831831}
832832
833833// CHECK-LABEL: @negative_store_more_than_one_element
834834// CHECK-SAME: (%[[ARG0:.*]]: memref<?xf32>, %[[ARG1:.*]]: index, %[[ARG2:.*]]: f32)
835835func.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>
837837// 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 >
839839 vector.store %0 , %arg0 [%arg1 ] : memref <?xf32 >, vector <4 xf32 >
840840 return
841841}
842842
843843// CHECK-LABEL: @negative_store_no_single_use
844844// CHECK-SAME: (%[[ARG0:.*]]: memref<?xf32>, %[[ARG1:.*]]: index, %[[ARG2:.*]]: f32)
845845func.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>
847847// CHECK: vector.store %[[RES]], %[[ARG0]][%[[ARG1]]] : memref<?xf32>, vector<1xf32>
848848// CHECK: return %[[RES:.*]] : vector<1xf32>
849- %0 = vector.splat %arg2 : vector <1 xf32 >
849+ %0 = vector.broadcast %arg2 : f32 to vector <1 xf32 >
850850 vector.store %0 , %arg0 [%arg1 ] : memref <?xf32 >, vector <1 xf32 >
851851 return %0 : vector <1 xf32 >
852852}
0 commit comments