[Mlir-commits] [mlir] [mlir][vector] Fold `in_bounds` for transfers with loop-derived indices (PR #215340)

Dhairyashil R G llvmlistbot at llvm.org
Tue Aug 25 08:03:34 PDT 2026


dhairyashilRG wrote:

@banach-space To unstick my own question: since you and @matthias-springer both prefer an opt-in pass, I'll just build that, no need to arbitrate it.

On the bigger one, my last comment trailed off, so to be explicit: yes, I'm willing to look into removing `in_bounds`. Rather than let it stall here I am writing it up as an RFC with target-by-target measurements, including a minimal `llvm.masked.load` repro that costs 25 instructions and 7 branches on NEON against 7 and 0 on SVE, and the same `transfer_read` costing 3 instructions with `in_bounds` and 32 without.

I've kept it framed as your proposal with the data attached, and flagged my own interest since I have this PR open. Happy to be corrected there if I've misstated any of it.

I'll also split the negative-index `>= 0` check into its own patch as mentioned.

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


More information about the Mlir-commits mailing list