[Mlir-commits] [mlir] [mlir][Vector] Add support for poison indices to `Extract/IndexOp` (PR #123488)
Jakub Kuderski
llvmlistbot at llvm.org
Sun Jan 19 12:37:18 PST 2025
================
@@ -132,6 +132,26 @@ func.func @extract_from_create_mask_dynamic_position(%dim0: index, %index: index
// -----
+// CHECK-LABEL: @extract_scalar_poison_idx
+func.func @extract_scalar_poison_idx(%a: vector<4x5xf32>) -> f32 {
+ // CHECK-NOT: vector.extract
+ // CHECK-NEXT: ub.poison : f32
+ %0 = vector.extract %a[-1, 0] : f32 from vector<4x5xf32>
----------------
kuhar wrote:
Should we have one test with multiple poison indices, e.g.: `[-1, -1, -1]`? This works with the existing implementation, but I wonder if it would make sense to be extra cautious and make sure that nothing in the future makes an accidental assumption of these ops having at most one poison index.
https://github.com/llvm/llvm-project/pull/123488
More information about the Mlir-commits
mailing list