[Mlir-commits] [mlir] [mlir][vector] Fix VectorToSCF in-bounds check for negative indices (PR #224843)
Andrzej WarzyĆski
llvmlistbot at llvm.org
Fri Sep 25 05:27:01 PDT 2026
================
@@ -923,3 +943,24 @@ func.func private @transfer_write_no_alloc_scope()
%cst = arith.constant dense<0.0> : vector<2x3xf32>
%m = memref.alloc() : memref<2x3xf32>
vector.transfer_write %cst, %m[%c0, %c0] : vector<2x3xf32>, memref<2x3xf32>
+
+// -----
+
+// Negative test: dynamic start index. Access is only valid when
+// 0 <= memrefIdx < memrefDim, so the guard must check both bounds
+// explicitly rather than relying on an unsigned reinterpretation trick.
----------------
banach-space wrote:
Thank you for clarifying!
I still don't follow what's unique about this test? What does it test that other tests fail to test? is it about having `transfer_read` with dynamic indices? Doesn't `@transfer_read_progressive` test that? What are `CHECK-NOT` needed for?
Btw, all in all no objections here, I just want to make sure that the extra test is indeed required.
https://github.com/llvm/llvm-project/pull/224843
More information about the Mlir-commits
mailing list