public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
From: "Amker.Cheng" <amker.cheng@gmail.com>
To: Miles Bader <miles@gnu.org>
Cc: Jeff Law <law@redhat.com>, Jeff Kenton <jkenton@tilera.com>,
		Ian Lance Taylor <iant@google.com>,
	David Brown <david@westcontrol.com>,
	Georg-Johann Lay <avr@gjlay.de>,
		gcc-help@gcc.gnu.org, charfiasma@yahoo.fr
Subject: Re: Tr : [redundency elimination, code motion, commun expression elimination] GCC optimizations
Date: Tue, 27 Sep 2011 16:47:00 -0000	[thread overview]
Message-ID: <CAHFci2_V5yiaVJj4jXP_N3xy0mHnWDH9ewY5J9_FVYqF25UT4Q@mail.gmail.com> (raw)
In-Reply-To: <buooby6h8l9.fsf@dhlpc061.dev.necel.com>

On Tue, Sep 27, 2011 at 1:12 PM, Miles Bader <miles@gnu.org> wrote:
> Miles Bader <miles@gnu.org> writes:
>>> Hmm, actually testing with a recent gcc snapshot, it _is_ merging the
>>> two if-blocks:
>> ...
>>
>> and in fact, gcc 4.4.6, 4.5.3, and 4.6.1 seem to do the same thing!
>>
>> So I dunno... what's the complaint again...?
>
> I note that this optimization only takes place at -O2 or above; maybe
> the original poster simply didn't use a high-enough optimization level?
>
> -miles
>
> --
> I'd rather be consing.
>

A case I ran into with gcc trunk after cprop1 pass:

  cc <- compare(r684, 0)
  if (cc != 0) goto .L1
  r191 <- 0
  goto .L2
.L1:
  r191 <- 0
  ...other insns
.L2:

In my experiment, both following pre and cse passes do not hoist the
r191<-0 to the beginning.
I understand that it is actually not a redundant case, and not pre's job.
So which pass in gcc might handle it? Thanks very much.

Wondering is it a similar story to the original post?
-- 
Best Regards.

  reply	other threads:[~2011-09-27  9:35 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <1316712613.83211.YahooMailNeo@web28503.mail.ukl.yahoo.com>
2011-09-22 19:59 ` charfi asma
2011-09-22 20:51   ` Ian Lance Taylor
2011-09-23  7:04   ` David Brown
2011-09-23  8:47     ` Georg-Johann Lay
2011-09-23  9:13       ` David Brown
2011-09-23 15:16         ` David Brown
2011-09-23 15:53         ` Ian Lance Taylor
2011-09-23 16:05           ` Jeff Kenton
2011-09-23 19:03             ` Jeff Law
2011-09-27  7:18               ` Miles Bader
2011-09-27  9:35                 ` Miles Bader
2011-09-27 11:29                   ` Miles Bader
2011-09-27 16:47                     ` Amker.Cheng [this message]
2011-09-27 23:42                       ` Jeff Law
2011-09-28  0:03                     ` Re : " charfi asma
2011-09-28  8:59                       ` Miles Bader
2011-09-25 13:31           ` David Brown
2011-09-25 13:50             ` David Brown
2011-09-26 10:57             ` Re : " charfi asma
2011-09-26 15:35               ` Miles Bader
2011-09-26 22:47               ` Jeff Law

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=CAHFci2_V5yiaVJj4jXP_N3xy0mHnWDH9ewY5J9_FVYqF25UT4Q@mail.gmail.com \
    --to=amker.cheng@gmail.com \
    --cc=avr@gjlay.de \
    --cc=charfiasma@yahoo.fr \
    --cc=david@westcontrol.com \
    --cc=gcc-help@gcc.gnu.org \
    --cc=iant@google.com \
    --cc=jkenton@tilera.com \
    --cc=law@redhat.com \
    --cc=miles@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).