[Mlir-commits] [mlir] [mlir][vector] Fix VectorToSCF in-bounds check for negative indices (PR #224843)

Matthias Springer llvmlistbot at llvm.org
Sat Sep 19 21:12:54 PDT 2026


https://github.com/matthias-springer commented:

I'm not sure if this is correct. Are the indices of `transfer_read` / `transfer_write` interpreted as signed or unsigned integers? The op semantics don't say. In fact, I could not find any mentioning of signedness in the entire vector dialect documentation. Maybe we can take some inspiration from other core dialects (memref, tensor, etc.) or LLVM.

Once we clarified the semantics, we can fix this: either by switching `sgt` to `ugt` (as you did here) or by adding a second OOB check condition such as `index >= 0`.

I would ask this question on the LLVM Discourse, so that we can make a consistent decision across MLIR.


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


More information about the Mlir-commits mailing list