[PATCH] D41715: AMDGPU: Process amdgpu.uniform on loads

Marek Olšák via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jan 10 13:49:28 PST 2018


mareko added inline comments.


================
Comment at: lib/Target/AMDGPU/AMDGPUAnnotateUniformValues.cpp:134-135
+
+  // This is true if loads have amdgpu.uniform on them (as opposed to GEP
+  // which might be dropped by InstCombine if the offset is 0).
+  if (I.getMetadata("amdgpu.uniform")) {
----------------
arsenm wrote:
> I'm not sure I understand the problem this is solving. Why is it dropped specifically if it is 0? If the offset is constant the GEP is uniform iff the base pointer is uniform
If the address is in VGPRs, the offset is 0, so we need to set amdgpu.uniform when there is no GEP.


https://reviews.llvm.org/D41715





More information about the llvm-commits mailing list