[Mlir-commits] [mlir] [mlir][vector] Add verification for incorrect vector.extract (PR #115824)
Andrzej WarzyĆski
llvmlistbot at llvm.org
Wed Nov 13 04:48:31 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>) {
----------------
banach-space wrote:
[nit] Same suggestion for `@extract_1d` and the insert variants.
```suggestion
func.func @extract_from_0d(%arg0: vector<f32>) -> (f32, vector<1xf32>) {
```
https://github.com/llvm/llvm-project/pull/115824
More information about the Mlir-commits
mailing list