https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97459

Jakub Jelinek <jakub at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  Attachment #49633|0                           |1
        is obsolete|                            |

--- Comment #19 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Created attachment 49634
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=49634&action=edit
gcc11-pr97459-wip.patch

The earlier patch was buggy, we can't really consider the bit 63 for 128-bit
umod or 31 for 64-bit umod, because the sum of the 3 numbers like:
0x7fffffffffffffffULL + 0x7fffffffffffffffULL + 0x3ULL can overflow and unlike
the bit 64 (or 32) case it would need more code to handle those 2 values where
it overflowed.

I'll see if I figure out how to do signed modulo too.

Reply via email to