public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
From: Jamie Prescott <jpresss@yahoo.com>
To: Jim Wilson <wilson@codesourcery.com>
Cc: Paolo Bonzini <bonzini@gnu.org>, gcc@gcc.gnu.org
Subject: Re: Code generation problem with optimizations enabled
Date: Thu, 14 May 2009 11:14:00 -0000	[thread overview]
Message-ID: <378064.3117.qm@web111602.mail.gq1.yahoo.com> (raw)
In-Reply-To: <4A0B709B.4080402@codesourcery.com>


----- Original Message ----
> From: Jim Wilson <wilson@codesourcery.com>
> To: Jamie Prescott <jpresss@yahoo.com>
> Cc: Paolo Bonzini <bonzini@gnu.org>; gcc@gcc.gnu.org
> Sent: Wednesday, May 13, 2009 6:15:07 PM
> Subject: Re: Code generation problem with optimizations enabled
> 
> Jamie Prescott wrote:
> > Thank you Paolo, I'll take a look at it.
> > Is there a reason why the fcmp insn was dropped with such implementation?
> 
> The code that optimizes away redundant cc0 compares is in final.c, in 
> final_scan_insn().  It is about line 2310 in my tree, near the comment "Check 
> for redundant test and compare instructions".  Try stepping through that code to 
> see what is going on.  Maybe you are setting cc_status.value1 but not 
> cc_status.value2?
> 
> In any case, as Paolo mentioned, you are better off not using cc0.  cc0 should 
> only be used if you have no other choice.  And even then, you still probably 
> shouldn't use it.  Every couple of years someone tries to eliminate the cc0 
> code, and eventually someone will succeed.

Thanks for the insight. But anyway, I took the path Paolo told me using CCmode and
now it's working nicely.


- Jamie


      

  reply	other threads:[~2009-05-14  1:30 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-05-12  8:09 Jamie Prescott
2009-05-12  8:31 ` Jamie Prescott
2009-05-12  9:28   ` Paolo Bonzini
2009-05-12 16:39     ` Jamie Prescott
2009-05-14  3:54       ` Jim Wilson
2009-05-14 11:14         ` Jamie Prescott [this message]
2009-05-12 17:54     ` Jamie Prescott

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=378064.3117.qm@web111602.mail.gq1.yahoo.com \
    --to=jpresss@yahoo.com \
    --cc=bonzini@gnu.org \
    --cc=gcc@gcc.gnu.org \
    --cc=wilson@codesourcery.com \
    /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).