https://gcc.gnu.org/bugzilla/show_bug.cgi?id=116946
--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> --- IIRC you can't use __builtin_constant_p in this way ever even without LTO.
pinskia at gcc dot gnu.org via Gcc-bugs Wed, 02 Oct 2024 17:49:32 -0700
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=116946
--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> --- IIRC you can't use __builtin_constant_p in this way ever even without LTO.