I’m currently working with Clang-CL based on the LLVM 8.0.0 (is that the right term? Or is it just Clang 8.0.0?) and targeting Windows with 64bit.
In my code I used the function “__builtin_signbitd64” which I picked up from the GCC list of builtin functions.
In my understanding, builtin functions are not really functions, but instead they get replaced with assembly instructions, like intrinsic functions. However, when I printed the resulting assembly code I got:
#DEBUG_VALUE: signbit:_X ← $xmm6
#DEBUG_VALUE: preSqrt ← $xmm6
.cv_inline_site_id 70 within 58 inlined_at 6 588 0
.cv_loc 70 7 312 0 # C:\Program Files (x86)\Windows Kits\10\Include\10.0.17134.0\ucrt\corecrt_math.h:312:0
movapd xmm0, xmm6
xorpd xmm0, xmm0
test eax, eax
And later an undefined reference to said “__builtin_signbitd64” function. Why? How do builtin functions work then? What is there purpose?