[PATCH] D15543: Use Flat For 64-bit Global Buffer

Tom Stellard via llvm-commits llvm-commits at lists.llvm.org
Tue Dec 22 11:03:27 PST 2015


tstellarAMD accepted this revision.
tstellarAMD added a comment.
This revision is now accepted and ready to land.

LGTM.

I think it would be good to explain why we are making this change in the commit message.  Here is the commit message I wrote when I was getting ready to commit an earlier version of the change.  Feel free to use it:

  AMDGPU/SI: Use flat for global load/store when targeting HSA
  
  For some reason doing executing an MUBUF instruction with the addr64
  bit set and a zero base pointer in the resource descriptor causes
  the memory operation to be dropped when the shader is executed using
  the HSA runtime.
  
  This kind of MUBUF instruction is commonly used when the pointer is
  stored in VGPRs.  The base pointer field in the resource descriptor
  is set to zero and and the pointer is stored in the vaddr field.
  
  This patch resolves the issue by only using flat instructions for
  global memory operations when targeting HSA. This is an overly
  conservative fix as all other configurations of MUBUF instructions
  appear to work.


================
Comment at: lib/Target/AMDGPU/CIInstructions.td:36-37
@@ -35,2 +35,4 @@
 
+
+
 //===----------------------------------------------------------------------===//
----------------
Unnecessary whitepsace change, please drop this before you commit.


http://reviews.llvm.org/D15543





More information about the llvm-commits mailing list