public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "jakub at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug rtl-optimization/97459] __uint128_t remainder for division by 3
Date: Fri, 27 Nov 2020 13:26:32 +0000	[thread overview]
Message-ID: <bug-97459-4-uUhdIfKDls@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-97459-4@http.gcc.gnu.org/bugzilla/>

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.

  parent reply	other threads:[~2020-11-27 13:26 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-10-16 13:33 [Bug rtl-optimization/97459] New: " tkoenig at gcc dot gnu.org
2020-10-16 15:22 ` [Bug rtl-optimization/97459] " jakub at gcc dot gnu.org
2020-10-16 15:52 ` jakub at gcc dot gnu.org
2020-10-16 15:57 ` jakub at gcc dot gnu.org
2020-10-17 12:22 ` tkoenig at gcc dot gnu.org
2020-10-18  7:33 ` tkoenig at gcc dot gnu.org
2020-10-18  9:11 ` jakub at gcc dot gnu.org
2020-10-19 11:51 ` jakub at gcc dot gnu.org
2020-10-19 12:05 ` jakub at gcc dot gnu.org
2020-10-20 18:16 ` tkoenig at gcc dot gnu.org
2020-10-23 16:56 ` tkoenig at gcc dot gnu.org
2020-10-24 18:09 ` tkoenig at gcc dot gnu.org
2020-10-24 18:14 ` tkoenig at gcc dot gnu.org
2020-10-26  5:28 ` tkoenig at gcc dot gnu.org
2020-11-08  9:31 ` tkoenig at gcc dot gnu.org
2020-11-08 10:24 ` jakub at gcc dot gnu.org
2020-11-08 19:28 ` tkoenig at gcc dot gnu.org
2020-11-08 19:33 ` tkoenig at gcc dot gnu.org
2020-11-26 19:12 ` jakub at gcc dot gnu.org
2020-11-27 13:26 ` jakub at gcc dot gnu.org [this message]
2020-11-27 15:10 ` jakub at gcc dot gnu.org
2020-11-27 18:34 ` jakub at gcc dot gnu.org
2020-11-30  9:57 ` cvs-commit at gcc dot gnu.org
2020-12-01 15:25 ` cvs-commit at gcc dot gnu.org
2020-12-02 10:41 ` cvs-commit at gcc dot gnu.org
2020-12-02 13:36 ` jakub at gcc dot gnu.org
2020-12-03 19:55 ` tkoenig at gcc dot gnu.org
2021-08-15 11:24 ` pinskia at gcc dot gnu.org

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bug-97459-4-uUhdIfKDls@http.gcc.gnu.org/bugzilla/ \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).