amdgcn: Move __clc_amdgcn_s_waitcnt definition to clc file

Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu>
Reviewed-By: Aaron Watry <awatry@gmail.com>
llvm-svn: 346082
This commit is contained in:
Jan Vesely 2018-11-04 00:39:27 +00:00
parent 0e95b6a579
commit f663e7e6da
4 changed files with 1 additions and 15 deletions

View File

@ -1,2 +1 @@
cl_khr_int64_extended_atomics/minmax_helpers.39.ll
mem_fence/waitcnt.ll

View File

@ -1,2 +1 @@
cl_khr_int64_extended_atomics/minmax_helpers.39.ll
mem_fence/waitcnt.ll

View File

@ -14,6 +14,7 @@ void __clc_amdgcn_s_waitcnt(unsigned flags);
# define __waitcnt(x) __builtin_amdgcn_s_waitcnt(x)
#else
# define __waitcnt(x) __clc_amdgcn_s_waitcnt(x)
_CLC_DEF void __clc_amdgcn_s_waitcnt(unsigned) __asm("llvm.amdgcn.s.waitcnt");
#endif
_CLC_DEF void mem_fence(cl_mem_fence_flags flags)

View File

@ -1,13 +0,0 @@
declare void @llvm.amdgcn.s.waitcnt(i32) #0
target datalayout = "e-p:32:32-p1:64:64-p2:64:64-p3:32:32-p4:64:64-p5:32:32-i64:64-v16:16-v24:32-v32:32-v48:64-v96:128-v192:256-v256:256-v512:512-v1024:1024-v2048:2048-n32:64"
; Export waitcnt intrinsic for clang < 5
define void @__clc_amdgcn_s_waitcnt(i32 %flags) #1 {
entry:
tail call void @llvm.amdgcn.s.waitcnt(i32 %flags)
ret void
}
attributes #0 = { nounwind }
attributes #1 = { nounwind alwaysinline }