https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114341
--- Comment #4 from Andrew Pinski <pinskia at gcc dot gnu.org> --- (In reply to Kang-Che Sung from comment #3) > I missed one case that is more obvious: > (1 << __builtin_ctz(y)) == (y & -y) > > Multiplication is not needed in this case, and thus (1 << __builtin_ctz(y)) > can simplify to (y & -y). (I didn't think of a reason we need to optimize > the other way around for this special case.) Well __builtin_ctz(y) is not well defined for y==0. But maybe that is ok here.