OSDN Git Service

AMDGPU/SI: Add llvm.amdgcn.s.waitcnt.all intrinsic
authorNicolai Haehnle <nhaehnle@gmail.com>
Wed, 27 Apr 2016 15:46:01 +0000 (15:46 +0000)
committerNicolai Haehnle <nhaehnle@gmail.com>
Wed, 27 Apr 2016 15:46:01 +0000 (15:46 +0000)
commit0493c734a287b5dc2ba011cb3b23dde7d2a45773
tree67f4ec2c703096aa2a9e5cb4649a5a7632f1c4c0
parentd0229876a99c6d82be4bc9ede45f4e51ef088846
AMDGPU/SI: Add llvm.amdgcn.s.waitcnt.all intrinsic

Summary:
So it appears that to guarantee some of the ordering requirements of a GLSL
memoryBarrier() executed in the shader, we need to emit an s_waitcnt.

(We can't use an s_barrier, because memoryBarrier() may appear anywhere in
the shader, in particular it may appear in non-uniform control flow.)

Reviewers: arsenm, mareko, tstellarAMD

Subscribers: arsenm, llvm-commits

Differential Revision: http://reviews.llvm.org/D19203

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@267729 91177308-0d34-0410-b5e6-96231b3b80d8
include/llvm/IR/IntrinsicsAMDGPU.td
lib/Target/AMDGPU/SIInsertWaits.cpp
lib/Target/AMDGPU/SIInstructions.td
test/CodeGen/AMDGPU/llvm.amdgcn.s.waitcnt.ll [new file with mode: 0644]