[Mlir-commits] [mlir] [mlir][Vector] Fix n-D vector.extract/insert lowering to LLVM (PR #87591)

Andrzej WarzyƄski llvmlistbot at llvm.org
Fri Apr 5 06:12:14 PDT 2024


================
@@ -738,6 +738,18 @@ func.func @extract_element_with_value_1d(%arg0: vector<16xf32>, %arg1: index) ->
 
 // -----
 
+func.func @extract_element_with_value_2d(%arg0: vector<1x16xf32>, %arg1: index) -> f32 {
+  %0 = vector.extract %arg0[0, %arg1]: f32 from vector<1x16xf32>
+  return %0 : f32
+}
+
+// Multi-dim vectors are not supported but this test shouldn't crash.
----------------
banach-space wrote:

To me this is more like "unsupported" rather than a "regression", but that's beside the point. 

+1 to moving such cases to a dedicated file (e.g. `vector-to-llvm-unsupported.mlir` or `vector-to-llvm-regression.mlir`). That really helps finding things that are known/expected not to work ("documenting through tests").

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


More information about the Mlir-commits mailing list