[llvm] [AMDGPU] Fix edge case of buffer OOB handling (PR #115479)

Piotr Sobczak via llvm-commits llvm-commits at lists.llvm.org
Thu Mar 6 01:48:33 PST 2025


piotrAMD wrote:

Just to elaborate on the motivation for this change.

I had discovered a compiler bug, where an out-of-bounds access can cause an adjacent, valid access to return zeros (as if it were also out-of-bounds). 
In this patch I fix it by disallowing aggressive merges. 
At the same time, I provide a target feature to opt out of this conservative behavior and keep the status quo for targets that do not care about strict out-of-bounds behavior. In out-of-bounds scenarios, the default code is correct.

If we do not submit this patch one way or another, the bug will persist.

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


More information about the llvm-commits mailing list