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.
Details
Details
Diff Detail
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
Comment Actions
Found by inspection but I think this is a real bug isn't it? I guess the fix is to put the noclobber metadata on the load instruction, not on the pointer, but then how do you get at it during instruction selection?
Comment Actions
Ugh... These are different arguments which may alias. I guess you could do the same with a single gep being reused for loads and stores...
Comment Actions
Right, but if a store is followed by a load from the exact same address, I thought some other pass might optimise the load away by replacing it with the value that was stored.
Comment Actions
That's a slippery ground. It should be better to find a way to attach it right to a load.