search for: intptr_t_kernel

Displaying 1 result from an estimated 1 matches for "intptr_t_kernel".

2013 Jan 31
0
[LLVMdev] intptr_t support in llvm
...ereference with * Is it safe to use the above typedefs ? The generated code seems correct for x86 machines (with llvm instruction ptrtoint). Or is there better way to make sure that the semantics of intprt_t are preserved in clang/llvm for all archs ? The code I tried to compile is __kernel void intptr_t_kernel(int *a, int *b) { intptr_t c = (intptr_t)a; b = (int*) c; *a += b; } and the code generated is define ptx_kernel void @intptr_t_kernel(i32* %a, i32* nocapture %b) nounwind noinline { entry: %0 = load i32* %a, align 4, !tbaa !1 %add.ptr = getelementptr inbounds i32* %a, i32 %0 %conv =...