public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
From: Richard Henderson <rth@redhat.com>
To: Dale Johannesen <dalej@apple.com>
Cc: gcc@gcc.gnu.org
Subject: Re: how to fix anti-optimization?
Date: Fri, 14 Sep 2001 13:36:00 -0000	[thread overview]
Message-ID: <20010914133646.A15601@redhat.com> (raw)
In-Reply-To: <200109141950.f8EJoNw06758@scv2.apple.com>

On Fri, Sep 14, 2001 at 12:50:47PM -0700, Dale Johannesen wrote:
> Some problems with this.  First, I discover that LEGITIMATE_CONSTANT_P on 
> rs6000 accepts some FP consts, after checking to see whether they can be 
> *moved* into int regs with 1 instruction per word.  That's not right, is 
> it?

Actually, it is.  While looking at a different problem, I remembered
that x86 does the same thing, since the best way to do "x = 2.0f" is
"movl $0x35800000,x".

I think you can just forget the LEGITIMATE_CONSTANT_P check.

> For this, the RT is to load from the array for the 1st two parameters, and 
> to do the multiplication at compile time, loading the resulting constant 
> 15.0 from a new memory loc.  So far I haven't been able to get that.

Hmm.  I'd expect cse_insn to be able to handle that...


r~

  parent reply	other threads:[~2001-09-14 13:36 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-09-12 11:34 dalej
2001-09-12 15:14 ` Richard Henderson
2001-09-14 12:50   ` Dale Johannesen
2001-09-14 13:02     ` David Edelsohn
2001-09-14 13:36     ` Richard Henderson [this message]
2001-09-13 10:50 ` David Edelsohn
2001-09-13 11:03   ` Dale Johannesen
2001-09-14 15:27 Richard Kenner

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=20010914133646.A15601@redhat.com \
    --to=rth@redhat.com \
    --cc=dalej@apple.com \
    --cc=gcc@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).