[Bug tree-optimization/90693] Missing popcount simplifications
pinskia at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Mon Mar 4 07:42:22 GMT 2024
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90693
--- Comment #12 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
(In reply to Piotr Siupa from comment #11)
> However, I've noticed that:
> bool foo(unsigned x)
> {
> if (x == 0)
> return true;
> else
> return std::has_single_bit(x);
> }
Oh that is because expand does not use flow sensitive ranges/non-zero bits
there. There is talk about adding the ability for that but nothing has been
done yet.
More information about the Gcc-bugs
mailing list