public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "amacleod at redhat dot com" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug tree-optimization/102879] [12 Regression] Dead Code Elimination Regression at -O3
Date: Thu, 21 Oct 2021 14:42:04 +0000 [thread overview]
Message-ID: <bug-102879-4-0n3V2GyAGl@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-102879-4@http.gcc.gnu.org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102879
--- Comment #2 from Andrew Macleod <amacleod at redhat dot com> ---
(In reply to Aldy Hernandez from comment #1)
>
>
> So, presumably _62 == 0 cannot be true. If _62 == 0, then
>
> 0 = _30 >> _6;
>
> But that cannot happen because _30 is 2 if you follow the series of copies
> from the "c" global.
>
> There is no way 0 = 2 >> x can ever be true.
>
> There's probably a couple things missing here. Maybe
> operator_rshift::op1_range needs to be taught that ~[0,0] = x >> y implies x
> is non-zero. But also, we can't see through the load from the c=2 global.
> Shouldn't that c=2 have been propagated by someone at this point? (VRP1?)
well, that depends on _6. 0 = _30 >> 32 is always true.
now, we do happen to know that _6 is [0,1], so if we did manage to determine
that _30 is [2,2], then the we will fold [2,2] >> [0,1] into [1,2] and then
everything should fall into place as we know we can never take that breanch.
That means our core issue is
c.2_28 = c;
_29 = (char) c.2_28;
_30 = (int) _29;
if (_29 >= 0)
that we don't propagate the 2 into the c.2_28. we are limited to a range of
[1,127] because of that.
next prev parent reply other threads:[~2021-10-21 14:42 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-10-21 12:51 [Bug tree-optimization/102879] New: " theodort at inf dot ethz.ch
2021-10-21 13:19 ` [Bug tree-optimization/102879] " marxin at gcc dot gnu.org
2021-10-21 14:09 ` aldyh at gcc dot gnu.org
2021-10-21 14:42 ` amacleod at redhat dot com [this message]
2021-10-21 20:01 ` pinskia at gcc dot gnu.org
2022-03-10 9:42 ` rguenth at gcc dot gnu.org
2022-03-10 10:06 ` rguenth at gcc dot gnu.org
2022-04-25 13:12 ` rguenth at gcc dot gnu.org
2022-05-06 8:31 ` [Bug tree-optimization/102879] [12/13 " jakub at gcc dot gnu.org
2022-07-26 13:22 ` rguenth at gcc dot gnu.org
2023-05-08 12:22 ` [Bug tree-optimization/102879] [12/13/14 " rguenth 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-102879-4-0n3V2GyAGl@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).