[llvm] [mlir] [MLIR][AMDGPU] Adding dynamic size check to avoid subword buffer load (PR #135014)

Zhuoran Yin via llvm-commits llvm-commits at lists.llvm.org
Wed Apr 9 07:10:54 PDT 2025


jerryyin wrote:

@krzysz00 I'd be interested to hear your thoughts on this.

My wild guess is that you'd prefer to more precise condition to check specifically on if the sub-word loading situation has appeared. The reason why I didn't take that approach is due to this adds a lot of overhead: 1) Taking an additional look into each element of the select vector 2) Checking if the offset is mis-aligned 3) Verifying the offset + select vector size exceed the buffer size. Realistically, I'd argue that my approach is a generic enough proxy that only happens at the last iteration of the K loop and doesn't adds as much of the overhead in checking the precise conditions.

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


More information about the llvm-commits mailing list