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

Oleksandr Alex Zinenko llvmlistbot at llvm.org
Fri Apr 5 00:50:16 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.
----------------
ftynse wrote:

I find value in "this shouldn't crash" comments. This marks the test as "regression" and differentiates it from the case when something used to be an error with `expected-error` test before support was added removing the error check but not the test. If repeated "this shouldn't crash" comment are too frequent, we may consider having "dialect-foo-regression.mlir` test file that collects them.

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


More information about the Mlir-commits mailing list