Skip to content

MLIR's memref.load/store should produce nuw and inbounds GEPs #20483

Closed
llvm/llvm-project
#140966

Description

@krzysz00

Depends on #20482

MLIR guarantees, as far as I can tell, that memref indices for memref.load, memref.store, and so on is that all indexes are non-negative and that they'll point within a memory object and not wrap around.

This is, LLVM-side, gelementptr nuw inbounds. We should be emitting that.

vector.load, ... doesn't have the inbounds, but does have the nuw and probably nusw.

(masked load, store, ... don't have any of these guarantees)

Activity

  1. added
    codegen/llvm
    on Apr 17, 2025
  2. added a commit that references this issue on May 7, 2025
    49b9531
  3. added 7 commits that reference this issue on May 15, 2025
    ffe1f3b
    e92c1f5
    f758f43
    1b2831e
    c96a224
    692beaa
  4. added a commit that references this issue on May 22, 2025
    45d8759
  5. added a commit that references this issue on May 22, 2025
    a481f9c
  6. added a commit that references this issue on Jun 14, 2026
    f509298
  7. added a commit that references this issue on Jul 19, 2026
    be7b566
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    codegen/llvm

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions