https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97459
--- Comment #6 from Jakub Jelinek <jakub at gcc dot gnu.org> --- I wasn't sure if the v5 version would be always correct. But the highest possible halves of the uint128_t number are 0xffffffffffffffff + 0xffffffffffffffff, which gives carry 1 and 0xfffffffffffffffeULL and so it won't overflow again when adding the carry to it. So perhaps for 3 we are ok, but probably not for the other modulo which could be using similar technique.