public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "ubizjak at gmail dot com" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug target/51838] Inefficient add of 128 bit quantity represented as 64 bit tuple to 128 bit integer.
Date: Mon, 30 Aug 2021 06:33:52 +0000	[thread overview]
Message-ID: <bug-51838-4-OqD3nwHtvx@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-51838-4@http.gcc.gnu.org/bugzilla/>

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

--- Comment #3 from Uroš Bizjak <ubizjak at gmail dot com> ---
(In reply to Hongtao.liu from comment #2)

> The interest thing is when i remove addti3 and ashlti3 from i386.md, GCC
> generates optimal code.

Yes, we had this situation with <logic>_doubleword instructions, and it looks
the same cure can also be applied to arithmetic and shift doubleword patterns.

In the past, the middle-end was not able to emit operations with carry, so we
were forced to implement doubleword arithmetic/shifts it as it is currently
done. If this limitation was lifted in the meantime, then removing interfering
patterns is the sure way to go.

There is a small complication with DImode patterns, which have to be present
for i686 to perform STV conversion, and we have to check for special values
(see for example "*anddi3_doubleword) and explicitly handle them.

      parent reply	other threads:[~2021-08-30  6:33 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-01-12 19:29 [Bug c/51838] New: " svfuerst at gmail dot com
2021-08-28 16:27 ` [Bug target/51838] " pinskia at gcc dot gnu.org
2021-08-30  4:58 ` crazylht at gmail dot com
2021-08-30  6:33 ` ubizjak at gmail dot com [this message]

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-51838-4-OqD3nwHtvx@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).