Skip to content
Snippets Groups Projects
Commit df0c467c authored by Artem Belevich's avatar Artem Belevich
Browse files

[NVPTX,CUDA] Added llvm.nvvm.fns intrinsic and matching __nvvm_fns builtin in clang.

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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@319909 91177308-0d34-0410-b5e6-96231b3b80d8
parent 7540bcca
No related branches found
No related tags found
No related merge requests found
...@@ -371,6 +371,9 @@ BUILTIN(__nvvm_bitcast_i2f, "fi", "") ...@@ -371,6 +371,9 @@ BUILTIN(__nvvm_bitcast_i2f, "fi", "")
BUILTIN(__nvvm_bitcast_ll2d, "dLLi", "") BUILTIN(__nvvm_bitcast_ll2d, "dLLi", "")
BUILTIN(__nvvm_bitcast_d2ll, "LLid", "") BUILTIN(__nvvm_bitcast_d2ll, "LLid", "")
// FNS
TARGET_BUILTIN(__nvvm_fns, "UiUiUii", "n", "ptx60")
// Sync // Sync
BUILTIN(__syncthreads, "v", "") BUILTIN(__syncthreads, "v", "")
......
...@@ -206,6 +206,10 @@ inline __device__ unsigned int __ballot_sync(unsigned int mask, int pred) { ...@@ -206,6 +206,10 @@ inline __device__ unsigned int __ballot_sync(unsigned int mask, int pred) {
inline __device__ unsigned int __activemask() { return __nvvm_vote_ballot(1); } inline __device__ unsigned int __activemask() { return __nvvm_vote_ballot(1); }
inline __device__ unsigned int __fns(unsigned mask, unsigned base, int offset) {
return __nvvm_fns(mask, base, offset);
}
#endif // !defined(__CUDA_ARCH__) || __CUDA_ARCH__ >= 300 #endif // !defined(__CUDA_ARCH__) || __CUDA_ARCH__ >= 300
// Define __match* builtins CUDA-9 headers expect to see. // Define __match* builtins CUDA-9 headers expect to see.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment