[Mlir-commits] [mlir] [mlir][vector] Add verification for incorrect vector.extract (PR #115824)

Diego Caballero llvmlistbot at llvm.org
Sat Nov 16 13:01:46 PST 2024


================
@@ -234,10 +234,24 @@ func.func @extract_val_idx(%arg0: vector<4x8x16xf32>, %idx: index)
 }
 
 // CHECK-LABEL: @extract_0d
-func.func @extract_0d(%a: vector<f32>) -> f32 {
-  // CHECK-NEXT: vector.extract %{{.*}}[] : f32 from vector<f32>
-  %0 = vector.extract %a[] : f32 from vector<f32>
-  return %0 : f32
+func.func @extract_0d(%arg0: vector<f32>) -> (f32, vector<1xf32>) {
----------------
dcaballe wrote:

The tests are grouped by `0d` and `1d` focus but not necessarily "from". We have tests that extract "a" `1d`, for example

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


More information about the Mlir-commits mailing list