[AMDGPU] Add test for a problem with noclobber metadata
authorJay Foad <jay.foad@amd.com>
Fri, 28 Jan 2022 13:05:39 +0000 (13:05 +0000)
committerJay Foad <jay.foad@amd.com>
Mon, 31 Jan 2022 11:09:34 +0000 (11:09 +0000)
commitae68b3a4577633a7be9e97319d39a7bc3cf37ee4
tree92e37ddaafee1a87c3b11efb34461b9334cb1ab3
parentffd0e464b4b98ffa9a511b09dd36cfba33fed8a1
[AMDGPU] Add test for a problem with noclobber metadata

If AMDGPUAnnotateUniformValues finds a load from a uniform pointer with
no potentially clobbering stores between the kernel entry point and the
load instruction, it adds noclobber metadata to the *address*. This is
unsafe because it can get applied to other loads in the same which do
have aliasing stores.

Differential Revision: https://reviews.llvm.org/D118458
llvm/test/CodeGen/AMDGPU/global_smrd.ll