summaryrefslogtreecommitdiffstats
path: root/llvm/test/CodeGen/AMDGPU/register-count-comments.ll
diff options
context:
space:
mode:
authorChangpeng Fang <changpeng.fang@gmail.com>2015-12-22 19:32:28 +0000
committerChangpeng Fang <changpeng.fang@gmail.com>2015-12-22 19:32:28 +0000
commit9b8a9be058706d2d37ce3a15b1f720c5113ea97d (patch)
tree2718e1dec5b034eb0749d23abbf4565301b18f52 /llvm/test/CodeGen/AMDGPU/register-count-comments.ll
parent9f0bebc3dab3d2541e9f2342a4658d08fc8d1bd8 (diff)
downloadbcm5719-llvm-9b8a9be058706d2d37ce3a15b1f720c5113ea97d.tar.gz
bcm5719-llvm-9b8a9be058706d2d37ce3a15b1f720c5113ea97d.zip
AMDGPU/SI: Use flat for global load/store when targeting HSA
Summary: 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. Reviewers: tstellarAMD Subscribers: arsenm, llvm-commits Differential Revision: http://reviews.llvm.org/D15543 llvm-svn: 256273
Diffstat (limited to 'llvm/test/CodeGen/AMDGPU/register-count-comments.ll')
-rw-r--r--llvm/test/CodeGen/AMDGPU/register-count-comments.ll2
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/test/CodeGen/AMDGPU/register-count-comments.ll b/llvm/test/CodeGen/AMDGPU/register-count-comments.ll
index 8c104d9e34b..4bb315049be 100644
--- a/llvm/test/CodeGen/AMDGPU/register-count-comments.ll
+++ b/llvm/test/CodeGen/AMDGPU/register-count-comments.ll
@@ -1,5 +1,5 @@
; RUN: llc -march=amdgcn -verify-machineinstrs -asm-verbose < %s | FileCheck -check-prefix=SI %s
-; RUN: llc -march=amdgcn -mtriple=amdgcn-unknown-amdhsa -verify-machineinstrs -asm-verbose < %s | FileCheck -check-prefix=SI %s
+; RUN: llc -march=amdgcn -mtriple=amdgcn-unknown-amdhsa -verify-machineinstrs -asm-verbose -mattr=-flat-for-global < %s | FileCheck -check-prefix=SI %s
declare i32 @llvm.SI.tid() nounwind readnone
OpenPOWER on IntegriCloud