[Bug c/98479] Missed optimization opportunity for unsigned __int128 modulo
jakub at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Wed Dec 30 14:18:46 GMT 2020
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98479
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |jakub at gcc dot gnu.org
--- Comment #1 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
GCC 11 will calculate this since PR97459 as
uint64_t r = (uint64_t) n & 0xfffffffffffffff;
r += (uint64_t) (n >> 60) & 0xfffffffffffffff;
r += (uint64_t) (n >> 120);
return r % 9;
instead as 2^60 == 1 (mod 9).
More information about the Gcc-bugs
mailing list