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.