[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


================
@@ -1049,104 +1049,103 @@ func.func @shuffle_2D(%a: vector<1x4xf32>, %b: vector<2x4xf32>) -> vector<3x4xf3
 
 // -----
 
-// CHECK-LABEL: @extractelement_0d
-func.func @extractelement_0d(%a: vector<f32>) -> f32 {
-  // CHECK: %[[C0:.*]] = llvm.mlir.constant(0 : index) : i64
-  // CHECK: llvm.extractelement %{{.*}}[%[[C0]] : {{.*}}] : vector<1xf32>
-  %1 = vector.extractelement %a[] : vector<f32>
+func.func @extractelement_from_vec_0d(%arg0: vector<f32>) -> f32 {
+  %1 = vector.extractelement %arg0[] : vector<f32>
   return %1 : f32
 }
+// CHECK-LABEL: @extractelement_from_vec_0d
+//       CHECK:   %[[C0:.*]] = llvm.mlir.constant(0 : index) : i64
+//       CHECK:   llvm.extractelement %{{.*}}[%[[C0]] : {{.*}}] : vector<1xf32>
 
 // -----
 
-func.func @extractelement(%arg0: vector<16xf32>) -> f32 {
+func.func @extractelement_from_vec_1d(%arg0: vector<16xf32>) -> f32 {
----------------
banach-space wrote:

```suggestion
func.func @extractelement_from_vec_1d_idx_as_i32(%arg0: vector<16xf32>) -> f32 {
```


https://github.com/llvm/llvm-project/pull/104784


More information about the Mlir-commits mailing list