I found this bug report on builtin_constant_p support in LLVM.
It looks like there was some interest in this, and that there was even a patch doing some work on that, but
it seems to have been abandoned. I couldn't tell if this was really because the community decided that support
for builtin_constant_p in LLVM IR was undesirable, or if the person working on this just lost interest.