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/101868] Incorrect reordering in -O2 with LTO
Date: Thu, 12 Aug 2021 00:36:10 +0000 [thread overview]
Message-ID: <bug-101868-4-Rl2vC78cAh@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-101868-4@http.gcc.gnu.org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101868
--- Comment #2 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
(In reply to Andrew Pinski from comment #1)
> Works for me on the trunk:
I almost want to say this was fixed by PR 101373.
Before Pre we had:
if (hash_6(D) == 0)
goto <bb 3>; [0.00%]
else
goto <bb 4>; [100.00%]
<bb 3> [count: 0]:
rb_check_type.isra (0);
goto <bb 6>; [0.00%]
<bb 4> [local count: 1073741824]:
_1 = (long int *) hash_6(D);
_2 = *_1;
if (_2 != 0)
goto <bb 5>; [0.00%]
else
goto <bb 6>; [100.00%]
<bb 5> [count: 0]:
rb_check_type.isra (hash_6(D));
<bb 6> [local count: 1073741824]:
_3 = (long int *) hash_6(D);
_4 = *_3;
Pre is able to figure that _3 and _1 are the same and even *_3 and *_1 would be
the same except rb_check_type.isra (hash_6(D)) can do a noreturn depending on
the argument even though it is a "pure" function otherwise.
next prev parent reply other threads:[~2021-08-12 0:36 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-08-11 23:54 [Bug c/101868] New: " gcc at alanwu dot email
2021-08-12 0:21 ` [Bug tree-optimization/101868] " pinskia at gcc dot gnu.org
2021-08-12 0:36 ` pinskia at gcc dot gnu.org [this message]
2021-08-12 8:25 ` marxin at gcc dot gnu.org
2021-08-12 8:28 ` marxin at gcc dot gnu.org
2021-08-12 15:09 ` [Bug tree-optimization/101868] [9/10/11 Regression] " pinskia at gcc dot gnu.org
2021-08-16 7:32 ` rguenth at gcc dot gnu.org
2021-08-16 7:57 ` marxin at gcc dot gnu.org
2021-08-16 21:18 ` mpolacek at gcc dot gnu.org
2021-08-17 6:24 ` rguenth at gcc dot gnu.org
2021-08-17 6:41 ` rguenth at gcc dot gnu.org
2021-08-17 9:21 ` cvs-commit at gcc dot gnu.org
2021-08-17 9:22 ` [Bug tree-optimization/101868] [9/10 " rguenth at gcc dot gnu.org
2021-08-17 9:24 ` cvs-commit at gcc dot gnu.org
2021-10-13 11:09 ` cvs-commit at gcc dot gnu.org
2021-11-08 14:07 ` [Bug tree-optimization/101868] [9 " cvs-commit at gcc dot gnu.org
2021-11-08 14:08 ` rguenth at gcc dot gnu.org
2022-06-24 20:25 ` cvs-commit 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-101868-4-Rl2vC78cAh@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).