public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
From: David Edelsohn <dje@watson.ibm.com>
To: Gabriel Paubert <paubert@iram.es>
Cc: Nathan Sidwell <nathan@codesourcery.com>, gcc <gcc@gcc.gnu.org>,
	Geoffrey Keating <geoffk@apple.com>
Subject: Re: PR target/17101: question about powerpc s<cond> expanders
Date: Tue, 16 Nov 2004 15:38:00 -0000	[thread overview]
Message-ID: <200411161524.iAGFO7D27942@makai.watson.ibm.com> (raw)
In-Reply-To: Message from Gabriel Paubert <paubert@iram.es>  of "Tue, 16 Nov 2004 00:41:06 +0100." <20041115234106.GB8995@iram.es>

>>>>> Gabriel Paubert writes:

Gabriel> Wouldn't the best solution in this case be?
Gabriel> addi tmp,val,-56 
Gabriel> nor tmp,tmp,val
Gabriel> srwi tmp,tmp,31

Gabriel> now when comparing two variables that is different. But when one 
Gabriel> of the operands is a constant there are lots of tricks to play 
Gabriel> with using the complete set of Power/PPC logical instructions on
Gabriel> the sign bit.

	Straight-line, simple integer sequences are better.
	
>> >	The number of instructions do not correspond to the cost.
>> >Compares, moving bits from condition registers, and bit extraction is
>> >slower on newer PowerPC processors.

Gabriel> I'm quite surprised that integer compares have been affected, that's a 
Gabriel> frequent operation and quite critical in a lot of applications. I was 
Gabriel> not aware that rlwinm (and I suppose rlwimi/cntlzw/sraw/srawi and their 
Gabriel> 64 bit equivalents) are becoming slower (relative to add/subtract and 
Gabriel> logical), but I suspect that this mostly affects high-end 64 bit 
Gabriel> processors and not 32 bit variants for embedded systems.

	I would appreciate if you would avoid hyperbole and spreading
misinformation.  You can look at the scheduling description in GCC to see
that your assumptions and statements are incorrect.

David

  reply	other threads:[~2004-11-16 15:24 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-11-12 17:16 Nathan Sidwell
2004-11-12 18:37 ` David Edelsohn
2004-11-12 19:30   ` Nathan Sidwell
2004-11-12 20:57     ` David Edelsohn
2004-11-16  8:26     ` Gabriel Paubert
2004-11-16 15:38       ` David Edelsohn [this message]
2004-11-12 19:45 ` Geoffrey Keating
2004-11-12 22:45   ` Nathan Sidwell
2004-11-15 23:39 ` Gabriel Paubert

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=200411161524.iAGFO7D27942@makai.watson.ibm.com \
    --to=dje@watson.ibm.com \
    --cc=gcc@gcc.gnu.org \
    --cc=geoffk@apple.com \
    --cc=nathan@codesourcery.com \
    --cc=paubert@iram.es \
    /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).