[all-commits] [llvm/llvm-project] 170c0d: [AMDGPU] Fix edge case of buffer OOB handling (#11...
Piotr Sobczak via All-commits
all-commits at lists.llvm.org
Thu Mar 6 23:57:05 PST 2025
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 170c0dac4488f9cfbc67e9593ebe6ad01cfa8f32
https://github.com/llvm/llvm-project/commit/170c0dac4488f9cfbc67e9593ebe6ad01cfa8f32
Author: Piotr Sobczak <piotr.sobczak at amd.com>
Date: 2025-03-07 (Fri, 07 Mar 2025)
Changed paths:
M llvm/lib/Target/AMDGPU/AMDGPU.td
M llvm/lib/Target/AMDGPU/GCNSubtarget.h
M llvm/lib/Target/AMDGPU/SIISelLowering.cpp
A llvm/test/CodeGen/AMDGPU/unaligned-buffer.ll
M llvm/test/CodeGen/AMDGPU/vectorize-buffer-fat-pointer.ll
M llvm/test/Transforms/LoadStoreVectorizer/AMDGPU/merge-vectors.ll
A llvm/test/Transforms/LoadStoreVectorizer/AMDGPU/unaligned-buffer.ll
Log Message:
-----------
[AMDGPU] Fix edge case of buffer OOB handling (#115479)
Strengthen out-of-bounds guarantees for buffer accesses by disallowing
buffer accesses with alignment lower than natural alignment.
This is needed to specifically address the edge case where an access
starts out-of-bounds and then enters in-bounds, as the hardware would
treat the entire access as being out-of-bounds. This is normally not
needed for most users, but at least one graphics device extension
(VK_EXT_robustness2) has very strict requirements - in-bounds accesses
must return correct value, and out-of-bounds accesses must return zero.
The direct consequence of the patch is that a buffer access at negative
address is not merged by load-store-vectorizer with one at a positive
address, which fixes a CTS test.
Targets that do not care about the new behavior are advised to use the
new target feature relaxed-buffer-oob-mode that maintains the state from
before the patch.
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list