public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "pinskia at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug c/99591] Improving __builtin_add_overflow performance on x86-64
Date: Wed, 01 Sep 2021 07:57:17 +0000 [thread overview]
Message-ID: <bug-99591-4-0Gp8x57Zpw@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-99591-4@http.gcc.gnu.org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99591
Andrew Pinski <pinskia at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Last reconfirmed| |2021-09-01
Ever confirmed|0 |1
Component|target |c
Status|UNCONFIRMED |NEW
--- Comment #4 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
(In reply to eggert from comment #3)
> (In reply to Andrew Pinski from comment #2)
> > (In reply to Andrew Pinski from comment #1)
> > > Looks fixed for GCC 11+.
> It doesn't appear to be fixed in GCC 11.2.1 20210728 (Red Hat 11.2.1-1). For
> signed1_overflow I get the same suboptimal machine code described in comment
> #0. For signed2_overflow I get:
This is interesting, the C++ front-end is fine but the C front-end is not.
C front-end:
return r = REALPART_EXPR <SAVE_EXPR <.ADD_OVERFLOW ((int) a, (int) b)>>;,
(_Bool) IMAGPART_EXPR <SAVE_EXPR <.ADD_OVERFLOW ((int) a, (int) b)>>;;
While the C++ frontend is:
<<cleanup_point return <retval> = r = REALPART_EXPR <SAVE_EXPR <.ADD_OVERFLOW
(a, b)>>;, (bool) IMAGPART_EXPR <SAVE_EXPR <.ADD_OVERFLOW (a, b)>>;>>;
next prev parent reply other threads:[~2021-09-01 7:57 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-03-15 8:46 [Bug target/99591] New: " eggert at gnu dot org
2021-09-01 5:30 ` [Bug target/99591] " pinskia at gcc dot gnu.org
2021-09-01 5:32 ` pinskia at gcc dot gnu.org
2021-09-01 7:44 ` eggert at cs dot ucla.edu
2021-09-01 7:57 ` pinskia at gcc dot gnu.org [this message]
2021-09-01 8:16 ` [Bug c/99591] " jakub at gcc dot gnu.org
2021-09-01 8:53 ` [Bug tree-optimization/99591] " jakub at gcc dot gnu.org
2021-09-02 9:26 ` cvs-commit at gcc dot gnu.org
2021-09-02 9:29 ` jakub 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-99591-4-0Gp8x57Zpw@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).