[AMDGPU] Eliminate barrier if workgroup size is not greater than wavefront size
authorStanislav Mekhanoshin <Stanislav.Mekhanoshin@amd.com>
Thu, 6 Apr 2017 16:48:30 +0000 (16:48 +0000)
committerStanislav Mekhanoshin <Stanislav.Mekhanoshin@amd.com>
Thu, 6 Apr 2017 16:48:30 +0000 (16:48 +0000)
commitea57c38521d46fe4a8ae2d1172d25538a88d4431
treef8848ebe196295e32e1b209346c5a78196231ed0
parent3fc1225c1851a2511bade654751e1ed42dda3653
[AMDGPU] Eliminate barrier if workgroup size is not greater than wavefront size

If a workgroup size is known to be not greater than wavefront size
the s_barrier instruction is not needed since all threads are guarantied
to come to the same point at the same time.

Differential Revision: https://reviews.llvm.org/D31731

llvm-svn: 299659
llvm/lib/Target/AMDGPU/SIISelLowering.cpp
llvm/test/CodeGen/AMDGPU/barrier-elimination.ll [new file with mode: 0644]
llvm/test/CodeGen/AMDGPU/indirect-private-64.ll