[Mlir-commits] [mlir] emit inbounds and nuw attributes in memref. (PR #138984)

Andrzej WarzyƄski llvmlistbot at llvm.org
Fri May 16 10:29:48 PDT 2025


banach-space wrote:

> inbounds implies nusw, and we additionally know nuw because all of the offsets we're adding are non-negative

OK, IIUC, we make this assumption based on the docs, but that's not something that we can enforce, right? Just making sure I follow the rationale :)

Similarly, `inbounds` is added based on what the docs for `memref.load` + `memref.store` say?

Could you document this rationale in MemrefToLLVM.cpp? Otherwise, `LLVM::GEPNoWrapFlags::nuw` is no different to a magic number. Thanks!

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


More information about the Mlir-commits mailing list