I found ARM intrinsic functions names on page 44 of ARM C language extensions. Some of them works in Xcode. This prints 31, as expected:
NSLog(@"%u", __builtin_clz(1));
Notes:
- I haven't found any references of this in Apple docs. Most likely Xcode inherited those functions from LLVM or CLANG.
- You don't need to include any special headers or frameworks to use those functions. Xcode IDE autocomplete doesn't know about them.
- Only a few functions from extensions list are implemented. According to pages 12-13 of the same document it should be two header files: arm_acle.h for non-NEON intrinsics and arm_neon.h for NEON intrinsics. Xcode have only the second file, but some of the functions from the first file declared somewhere else.