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 tree-optimization/101139] Unable to remove double byteswap in fast path
Date: Sun, 20 Jun 2021 09:48:34 +0000 [thread overview]
Message-ID: <bug-101139-4-qXeL9GnWqF@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-101139-4@http.gcc.gnu.org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101139
--- Comment #2 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
(In reply to Andrew Pinski from comment #1)
> if (b_13 < h.0_15)
> goto <bb 4>; [51.12%]
> else
> goto <bb 5>; [48.88%]
>
> <bb 4> [local count: 548896825]:
> _16 = (short unsigned int) f$ab_14;
> _17 = (int) _16;
> _18 = __builtin_bswap16 (_17);
> goto <bb 6>; [100.00%]
>
> <bb 5> [local count: 524845000]:
> k_22 = i ();
> c.1_23 = (short unsigned int) k_22;
> _24 = (int) c.1_23;
> _25 = __builtin_bswap16 (_24);
>
> <bb 6> [local count: 1073741824]:
> # prephitmp_32 = PHI <_18(4), _25(5)>
>
> Basically the same issue as PR 13563.
Once that issue is fixed we should get:
if (b_13 < h.0_15)
goto <bb 4>; [51.12%]
else
goto <bb 5>; [48.88%]
<bb 4> [local count: 548896825]:
_16 = (short unsigned int) f$ab_14;
goto <bb 6>; [100.00%]
<bb 5> [local count: 524845000]:
k_22 = i ();
c.1_23 = (short unsigned int) k_22;
<bb 6> [local count: 1073741824]:
# c.1_23 = PHI <_16(4), c.1_23(5)>
_24 = (int) c.1_23;
prephitmp_32 = __builtin_bswap16 (_32);
_2 = (int) prephitmp_32;
_3 = __builtin_bswap16 (_2);
_4 = (int) _3;
Which then should just optimize later on to: if (b_13 < h.0_15)
goto <bb 4>; [51.12%]
else
goto <bb 5>; [48.88%]
<bb 4> [local count: 548896825]:
_16 = (short unsigned int) f$ab_14;
goto <bb 6>; [100.00%]
<bb 5> [local count: 524845000]:
k_22 = i ();
c.1_23 = (short unsigned int) k_22;
<bb 6> [local count: 1073741824]:
# c.1_23 = PHI <_16(4), c.1_23(5)>
_24 = (int) c.1_23;
_4 = _24;
(If I did this conversion right)
next prev parent reply other threads:[~2021-06-20 9:48 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-06-20 9:37 [Bug tree-optimization/101139] New: " steinar+gcc at gunderson dot no
2021-06-20 9:41 ` [Bug tree-optimization/101139] " pinskia at gcc dot gnu.org
2021-06-20 9:48 ` pinskia at gcc dot gnu.org [this message]
2021-06-21 6:37 ` rguenth at gcc dot gnu.org
2021-06-26 16:51 ` steinar+gcc at gunderson dot no
2024-04-20 7:25 ` 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-101139-4-qXeL9GnWqF@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).