On a similar note, the LLVM intrinsic documentation should probably also be autogenerated from tablegen.
There’s precedent for autogenerating documentation from tablegen for clang attributes (include/clang/Basic/AttrDocs.td) and driver options (include/clang/Driver/ClangOptionDocs.td). I have a mind to build something like that for LLVM intrinsics, and clang builtins can certainly partially leverage that documentation as well (as several clang builtins are also LLVM intrinsics), but I haven’t had any time to do more than think about it.
Let’s be sure to make a distinction between the builtins which are defined in TableGen files and (yes) built-in to the compiler, versus intrinsic functions which are defined in the header files maintained in clang/lib/Headers (and which commonly invoke builtin functions to achieve their effect). Documentation for the latter is in the header files themselves. (I’ll be adding documentation to a chunk of X86 intrinsics in the Headers in the near future.)
I’ll also note that there have been efforts in the past to improve instruction selection to the point of being able to eliminate bunches of target-specific builtins, and rewrite the intrinsics in Headers to use normal expressions rather than invoking builtins.