mirror of
https://github.com/capstone-engine/llvm-capstone.git
synced 2024-10-07 19:03:57 +00:00
r600: Use llvm intrinsic to read work dimension information
v2: Fix function declaration Add range metadata to r600 implementation v3: change prefix to AMDGPU Reviewed-by: Tom Stellard <tom@stellard.net> Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu> llvm-svn: 219793
This commit is contained in:
parent
8513d6234d
commit
260827caa2
1
libclc/generic/include/clc/workitem/get_work_dim.h
Normal file
1
libclc/generic/include/clc/workitem/get_work_dim.h
Normal file
@ -0,0 +1 @@
|
||||
_CLC_DECL uint get_work_dim();
|
@ -5,5 +5,6 @@ workitem/get_group_id.ll
|
||||
workitem/get_local_size.ll
|
||||
workitem/get_local_id.ll
|
||||
workitem/get_global_size.ll
|
||||
workitem/get_work_dim.ll
|
||||
synchronization/barrier.cl
|
||||
synchronization/barrier_impl.ll
|
||||
|
8
libclc/r600/lib/workitem/get_work_dim.ll
Normal file
8
libclc/r600/lib/workitem/get_work_dim.ll
Normal file
@ -0,0 +1,8 @@
|
||||
declare i32 @llvm.AMDGPU.read.workdim() nounwind readnone
|
||||
|
||||
define i32 @get_work_dim() nounwind readnone alwaysinline {
|
||||
%x = call i32 @llvm.AMDGPU.read.workdim() nounwind readnone , !range !0
|
||||
ret i32 %x
|
||||
}
|
||||
|
||||
!0 = metadata !{ i8 1, i8 2, i8 3 }
|
Loading…
Reference in New Issue
Block a user