[Mlir-commits] [mlir] [mlir][vector] Add more tests for ConvertVectorToLLVM (5/n) (PR #104784)
Andrzej WarzyĆski
llvmlistbot at llvm.org
Tue Aug 20 06:06:56 PDT 2024
================
@@ -1423,39 +1432,52 @@ func.func @insert_element_into_vec_3d_scalable(%arg0: f32, %arg1: vector<4x8x[16
// -----
-func.func @insert_element_with_value_1d(%arg0: vector<16xf32>, %arg1: f32, %arg2: index)
+func.func @insert_scalar_into_vec_1d_f32_dynamic_idx(%arg0: vector<16xf32>, %arg1: f32, %arg2: index)
-> vector<16xf32> {
%0 = vector.insert %arg1, %arg0[%arg2]: f32 into vector<16xf32>
return %0 : vector<16xf32>
}
-// CHECK-LABEL: @insert_element_with_value_1d
+// CHECK-LABEL: @insert_scalar_into_vec_1d_f32_dynamic_idx
// CHECK-SAME: %[[DST:.+]]: vector<16xf32>, %[[SRC:.+]]: f32, %[[INDEX:.+]]: index
// CHECK: %[[UC:.+]] = builtin.unrealized_conversion_cast %[[INDEX]] : index to i64
// CHECK: llvm.insertelement %[[SRC]], %[[DST]][%[[UC]] : i64] : vector<16xf32>
-func.func @insert_element_with_value_1d_scalable(%arg0: vector<[16]xf32>, %arg1: f32, %arg2: index)
+func.func @insert_scalar_into_vec_1d_f32_dynamic_idx_scalable(%arg0: vector<[16]xf32>, %arg1: f32, %arg2: index)
-> vector<[16]xf32> {
%0 = vector.insert %arg1, %arg0[%arg2]: f32 into vector<[16]xf32>
return %0 : vector<[16]xf32>
}
-// CHECK-LABEL: @insert_element_with_value_1d_scalable
+// CHECK-LABEL: @insert_scalar_into_vec_1d_f32_dynamic_idx_scalable
// CHECK-SAME: %[[DST:.+]]: vector<[16]xf32>, %[[SRC:.+]]: f32, %[[INDEX:.+]]: index
// CHECK: %[[UC:.+]] = builtin.unrealized_conversion_cast %[[INDEX]] : index to i64
// CHECK: llvm.insertelement %[[SRC]], %[[DST]][%[[UC]] : i64] : vector<[16]xf32>
// -----
-func.func @insert_element_with_value_2d(%base: vector<1x16xf32>, %value: f32, %idx: index)
+func.func @insert_scalar_into_vec_2d_f32_dynamic_idx(%base: vector<1x16xf32>, %value: f32, %idx: index)
----------------
banach-space wrote:
```suggestion
func.func @insert_scalar_into_vec_2d_f32_dynamic_idx(%arg0: vector<1x16xf32>, %arg1: f32, %idx: index)
```
Missed this one?
https://github.com/llvm/llvm-project/pull/104784
More information about the Mlir-commits
mailing list