[llvm-branch-commits] [llvm] [AMDGPU] Fold provably out-of-bounds raw buffer loads/stores (PR #227402)

Dark Steve via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Sun Nov 8 22:40:43 PST 2026


PrasoonMishra wrote:

@arsenm @krzysz00 Sorry for the delay. I've updated the patch:
- OOB checks are put in `AMDGPUBufferUtils` and is used from both `InstCombine` and `AMDGPULowerBufferFatPointers`.
- Renamed the OOB models by `OOB_SELECT` width.
- `llvm.amdgcn.make.buffer.rsrc.ll` tests (SDAG/GlobalISel): read_buffer_fat_ptr_p0/p1 use a zero-sized buffer, so on gfx9 the load now folds to 0. 

PTAL.

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


More information about the llvm-branch-commits mailing list