public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "rguenth at gcc dot gnu dot org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug tree-optimization/42906] [4.5 Regression] Empty loop not removed
Date: Sat, 30 Jan 2010 16:55:00 -0000 [thread overview]
Message-ID: <20100130165448.18060.qmail@sourceware.org> (raw)
In-Reply-To: <bug-42906-10053@http.gcc.gnu.org/bugzilla/>
------- Comment #6 from rguenth at gcc dot gnu dot org 2010-01-30 16:54 -------
(In reply to comment #4)
> Eh, ignore comment #3. My understanding of CD-DCE really *is* rusty :-).
>
> Being more careful now: IIRC the statement "j = 0" would have been control
> dependent on "if (b)" and marking "j = 0" would result in marking "if (b)"
> necessary.
>
> But since the value "0" is propagated into the PHI, there is no statement left
> to mark "if (b)" necessary. So ignoring the edge with the constant (like the
> very wrong patch of comment #3) results in *nothing* needing "if (b)" anymore.
> So the function is incorrectly transformed to just "return j".
>
> What is necessary here, is a reason to mark "if (b)" necessary, but not the
> loop. But since the loop now falls through directly to the PHI for "j_1", I
> don't see how...
You have the other PHI argument for that which _is_ control-dependent on
if (b) (like the constant PHI arg should be).
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42906
next prev parent reply other threads:[~2010-01-30 16:55 UTC|newest]
Thread overview: 36+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-01-30 16:06 [Bug tree-optimization/42906] New: " rguenth at gcc dot gnu dot org
2010-01-30 16:06 ` [Bug tree-optimization/42906] " rguenth at gcc dot gnu dot org
2010-01-30 16:37 ` steven at gcc dot gnu dot org
2010-01-30 16:42 ` steven at gcc dot gnu dot org
2010-01-30 16:46 ` steven at gcc dot gnu dot org
2010-01-30 16:51 ` steven at gcc dot gnu dot org
2010-01-30 16:53 ` rguenth at gcc dot gnu dot org
2010-01-30 16:55 ` rguenth at gcc dot gnu dot org [this message]
2010-01-30 16:58 ` rguenth at gcc dot gnu dot org
2010-01-30 16:58 ` rguenth at gcc dot gnu dot org
2010-01-30 17:31 ` steven at gcc dot gnu dot org
2010-01-30 20:32 ` steven at gcc dot gnu dot org
2010-01-30 20:56 ` rguenth at gcc dot gnu dot org
2010-01-30 21:12 ` rguenth at gcc dot gnu dot org
2010-01-30 23:04 ` rguenth at gcc dot gnu dot org
2010-01-30 23:15 ` steven at gcc dot gnu dot org
2010-02-02 13:31 ` rguenth at gcc dot gnu dot org
2010-02-16 19:54 ` changpeng dot fang at amd dot com
2010-02-16 19:57 ` pinskia at gcc dot gnu dot org
2010-03-17 0:19 ` changpeng dot fang at amd dot com
2010-03-17 0:22 ` changpeng dot fang at amd dot com
2010-03-17 10:01 ` rguenther at suse dot de
2010-03-18 17:24 ` changpeng dot fang at amd dot com
2010-03-18 17:30 ` rguenther at suse dot de
2010-03-24 18:18 ` hubicka at gcc dot gnu dot org
2010-03-24 19:02 ` hubicka at gcc dot gnu dot org
2010-03-25 17:23 ` hubicka at ucw dot cz
2010-03-27 18:31 ` hubicka at gcc dot gnu dot org
2010-04-06 11:26 ` rguenth at gcc dot gnu dot org
2010-04-06 11:38 ` hubicka at ucw dot cz
2010-04-06 15:19 ` hubicka at gcc dot gnu dot org
2010-07-31 9:35 ` rguenth at gcc dot gnu dot org
[not found] <bug-42906-4@http.gcc.gnu.org/bugzilla/>
2010-12-16 13:05 ` rguenth at gcc dot gnu.org
2011-04-28 15:15 ` rguenth at gcc dot gnu.org
2012-03-23 15:34 ` hubicka at gcc dot gnu.org
2012-07-02 10:29 ` 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=20100130165448.18060.qmail@sourceware.org \
--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).