https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82853
--- Comment #22 from Jakub Jelinek <jakub at gcc dot gnu.org> --- So, while it isn't correct to replace x % 3U == 1 by (x - 1) % 3U == 0, because for x == 0 the test will yield a different value, as 0xffffffffU % 3U is 0 and 0 % 3U is also 0, x % 3U == 1 is equivalent to (x - 1) * 0xaaaaaaabU <= 0x55555554U, but x % 3U == 0 is equivalent to x * 0xaaaaaaabU <= 0x55555555U. Now to see if something useful can be used also for the even divisors.