[Mlir-commits] [mlir] [mlir][vector] Add more tests for ConvertVectorToLLVM (5/n) (PR #104784)
Andrzej WarzyĆski
llvmlistbot at llvm.org
Mon Aug 19 13:01:06 PDT 2024
================
@@ -1191,171 +1190,181 @@ func.func @extract_vec_1d_from_vec_3d_scalable(%arg0: vector<4x3x[16]xf32>) -> v
// -----
-func.func @extract_element_from_vec_3d(%arg0: vector<4x3x16xf32>) -> f32 {
+func.func @extract_scalar_from_vec_3d(%arg0: vector<4x3x16xf32>) -> f32 {
%0 = vector.extract %arg0[0, 0, 0]: f32 from vector<4x3x16xf32>
return %0 : f32
}
-// CHECK-LABEL: @extract_element_from_vec_3d
+// CHECK-LABEL: @extract_scalar_from_vec_3d
// CHECK: llvm.extractvalue {{.*}}[0, 0] : !llvm.array<4 x array<3 x vector<16xf32>>>
// CHECK: llvm.mlir.constant(0 : i64) : i64
// CHECK: llvm.extractelement {{.*}}[{{.*}} : i64] : vector<16xf32>
// CHECK: return {{.*}} : f32
-func.func @extract_element_from_vec_3d_scalable(%arg0: vector<4x3x[16]xf32>) -> f32 {
+func.func @extract_scalar_from_vec_3d_scalable(%arg0: vector<4x3x[16]xf32>) -> f32 {
%0 = vector.extract %arg0[0, 0, 0]: f32 from vector<4x3x[16]xf32>
return %0 : f32
}
-// CHECK-LABEL: @extract_element_from_vec_3d_scalable
+// CHECK-LABEL: @extract_scalar_from_vec_3d_scalable
// CHECK: llvm.extractvalue {{.*}}[0, 0] : !llvm.array<4 x array<3 x vector<[16]xf32>>>
// CHECK: llvm.mlir.constant(0 : i64) : i64
// CHECK: llvm.extractelement {{.*}}[{{.*}} : i64] : vector<[16]xf32>
// CHECK: return {{.*}} : f32
// -----
-func.func @extract_element_with_value_1d(%arg0: vector<16xf32>, %arg1: index) -> f32 {
+func.func @extract_scalar_dynamic_position_from_vec_1d(%arg0: vector<16xf32>, %arg1: index) -> f32 {
----------------
banach-space wrote:
```suggestion
func.func @extract_scalar_from_vec_1d_f32_dynamic_idx(%arg0: vector<16xf32>, %arg1: index) -> f32 {
```
Note that further down "dynamic_position" is added at the end.
https://github.com/llvm/llvm-project/pull/104784
More information about the Mlir-commits
mailing list