https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86590

Pedro Alves <palves at redhat dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |palves at redhat dot com

--- Comment #19 from Pedro Alves <palves at redhat dot com> ---
> confuses us because of the stupid structure of __constant_string_p.

Yes, a stupid workaround for a stupid __builtin_strlen, which is being punished
by a stupid optimizer.  ;-)

I'll be the first to say "good riddance" when this disappears, but I'm honestly
surprised the optimizers can't _always_ inline all of that, given it's
basically just "do I know this at compile time" checks...  I'd think that
fixing that would help generate better code in other uses of
__builtin_constant_p in other codebases.  As I mentioned in
<https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80265#c32>, interestingly the
trick made some cases optimize _better_, which kind of suggests to me that
__builtin_foo functions are missing some comparing-known-constant-objects
optimizations.

Reply via email to