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

Fang, Changpeng via llvm-commits llvm-commits at lists.llvm.org
Tue Dec 22 12:15:38 PST 2015


Commited but was reverted because of a lIT failure on llvm.dbg.ll.

But this is the test I modified and my local test of this passed.

What could happen?

Thanks;

Changpeng

-----Original Message-----
From: Tom Stellard [mailto:tom at stellard.net] 
Sent: Tuesday, December 22, 2015 11:03 AM
To: Fang, Changpeng; tom at stellard.net
Cc: llvm-commits at lists.llvm.org; Arsenault, Matthew
Subject: Re: [PATCH] D15543: Use Flat For 64-bit Global Buffer

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