https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100623
--- Comment #3 from Andrew Pinski <pinskia at gcc dot gnu.org> --- There seems to be some IR difference on the gimple level which might be making this latent. In GCC 11.2.0 we have (bn_add_words) : _2 = n_3 & -4; ... if (_2 != 0) While on the trunk we have: _14 = (unsigned int) n_3; if (_14 > 3) This does look like a valid transformation knowing that n is subtracted by 4.