[Xtensa] Move XtensaUtils to MCTargetDesc
[llvm-project.git] / libclc / amdgcn / lib / workitem / get_work_dim.cl
blobcb8cf83a220c97ab5e3bbb97dddb77897d95819c
1 #include <clc/clc.h>
3 #if __clang_major__ >= 8
4 #define CONST_AS __constant
5 #elif __clang_major__ >= 7
6 #define CONST_AS __attribute__((address_space(4)))
7 #else
8 #define CONST_AS __attribute__((address_space(2)))
9 #endif
11 _CLC_DEF _CLC_OVERLOAD uint get_work_dim(void) {
12 CONST_AS uint *ptr = (CONST_AS uint *)__builtin_amdgcn_implicitarg_ptr();
13 return ptr[0];